Count cells by weekends

Range Reference:
Weekday:
enter the cell reference that captures the value that represents one of the days from a weekend that you want to count for
Formula:

=SUMPRODUCT(--(WEEKDAY(B5:B11,2)=C14))

=SUMPRODUCT(--(WEEKDAY(B5:B11,2)=C14))