select count(*) cnt from [ExpressSeed$ES Contract] (nolock) where No_= '{0}' and ([Customer No_] = '' or [Master Quote]=1)