Question: How to count, for example, mondays in a range?

Answer: If your range looks like this (see picture below), use =SUM(N(WEEKDAY(A1:A15)=2)) + Ctrl +Shift Enter

If your range looks like this (see picture below), use =SUM(N(WEEKDAY(ROW(INDIRECT("D4:D"&A18-A17+1))+A17-1)=4)) + Ctrl +Shift Enter
This formula creates all dates in the range and checks how are a match to 4. (Wednesday)

Related posts:

excel find weekday in period

How many of a specific weekday falls between a start date and an end date except holidays

Count specific weekdays in a date range

Excel: Count the number of cells within a range that meet the given condition

Sort numeric values by closest to farthest to a specific number in excel (array formula)