declare @dts datetime,@dte datetime
select @dts='2010-05-01',@dte='2010-06-1'
select count(*)
from master..spt_values
where dateadd(day,number,@dts)<
=@dte and type='P' and
(datepart(weekday,dateadd(day,number,@dts))+@@datefirst-1)%7 between 1 and 5