Count cells if weekdays

Range Reference:
Weekday:
enter the cell reference that captures the value that represents the last weekday (Friday) that corresponds to the return type
Formula:

=SUMPRODUCT(--(WEEKDAY(B8:B14,2)<=C5))

=SUMPRODUCT(--(WEEKDAY(B8:B14,2)<=C5))