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)