See this link:

formula to calculate numbers of days (i.e. Monday's) in a monthl