I ended up using a while loop to count the number of weekdays.
i keep cycling back one day at a time until i get the the desired number of weekdays using this weekday logic:
set @isweekday=case when (DATEPART(dw, @tempdate) + @@DATEFIRST) % 7 NOT IN (0, 1) then 1 else 0 end