A month can have either $31, 30$, or $28$ days excluding leap years. Suppose we want to know "how many Fridays are in a given month". By considering the maximal case where the first Friday falls on the $1$st of the month we know there can be a maximum of $5$ Fridays.
The question then becomes: At what placement of Friday in the first $7$ days does the $5$th Friday rollover into the next month. We see that in the case of a $31$ day month the first Friday can fall on at latest the $3$rd.
My question is: Is there a better way to go about this problem than by inspecting each case and counting through for each choice of first Friday? How does the year (and the weekday on which it began) affect the problem (which months have $5$ Fridays and which don't and/or the total number of Fridays)?
If the first friday is the first then the fifth friday is the $(7\cdot4)+1=28$.
If the first friday is the $k$'th then the fourth friday is the $(7\cdot 4)+k$
So a month with $n$ days in which day $k$ was friday has $5$ fridays if and only if $28+k\leq n\implies k\leq n-28$.
So for $n=31$ there are $3$ options,for $n=30$ there are $2$ options, and for $n=28$ there are $0$ options.