If I remember correctly, the rules are:
In markets with 45 or more signals: 8 stations, no more than 5 on one band.
30-44 signals: 7 with no more than 4 on one band.
15-29 signals: 6 with no more than 4 on one band
< 15 signals: 5 with no more than 3 on one band and station count cannot exceed half the total stations in the market.
There are also portability rules for entities that own both TV and radio. In larger markets, one TV station counts as one radio station with a maximum of two stations. Smaller markets have additional restrictions.