If by "only 31 days" you mean "exactly 31 days", then 7. If by "only 31 days" you mean "not more than 31 days" then all of them.
All 12 months have "at least" 28 days. Only February has exactly 28 days, except in leap year.
30 days hath September, April, June and November. All the rest have 31 except for February.
It is 31 months and 23 days.
5 months don't have 31 days, 7 months do. February has 28, or 29 in leap years. April, June, September, and November have 30 days.
If by "only 31 days" you mean "exactly 31 days", then 7. If by "only 31 days" you mean "not more than 31 days" then all of them.
All 12 months have "at least" 28 days. Only February has exactly 28 days, except in leap year.
Assuming there are 31 days in a month, it is nearly exactly one month,
11. The question is not specifically asking how many months have "exactly" 30 days. 11 months have "at least" 30 days. There are four months that do have exactly 30 days, and there are at least five different versions of this riddle.
It 31 days in this months
30 days hath September, April, June and November. All the rest have 31 except for February.
It is 31 months and 23 days.
31 Days. The first 5 odd months, and the last 3 even months, have 31 days.
It is 31 months and 23 days.
5 months don't have 31 days, 7 months do. February has 28, or 29 in leap years. April, June, September, and November have 30 days.
The riddle answer is "12" because all 12 months contain "at least" 28 days. February is the only month that has 28 days exactly, but 29 in a leap year.(The trick is that everyone says "1" because of this distinction. The version "If there are 7 months that have 31 days and 11 months that have 30 days, how many months have 28 days?" telegraphs the answer unless someone doesn't know how many months there are in total. So it is either erroneous or trivial.)
Most months have 31 days. So if you divide 503/31 you get 16.22 months. So approximately 16 months.