Is this it?
=NETWORKDAYS(A1,B10)+SUM(IF(WEEKDAY(A1-1+ROW(INDIRECT("1:"&TRUNC(B10-A1)+1)))=C2,1,0))
A1 contains the beginning date of the interval
B10 contains the ending date of the interval
C2 contains the day-of-week number (1=Sunday, 2=Monday,...,7=Saturday)