Currently the maximum number of buildings is limited by city size and building type. I simply suggest that groups of incompatible buildings share the same hard-cap. Things like passive and aggressive buildings (morality): a monastary vs barracks, or other conflicting build choices (population): slums vs mansions vs sacrificial alters. (production): the first small production building, producting materials, food, research etc
Also, the hard-cap should be adjustable... I'd like each city to have a specialisation, limited to one area with a maxed hard-cap (build all x research buildings, gain the option to upgrade to research specialist). That area would then gain a point bonus to the hard-cap and further bonuses could be bought, perhaps by sacrificing points in other areas.
A final thing, rather than having a hundred identical buildings in a row, buildings over the hard cap could simply upgrade one of the buildings already present...with a simple icon on it's tile or pattern to it's roof. Perhaps these could gain a greater than 100% bonus, say 125%, a good incentive to reduce the capacity of a city in other areas, especially when multiplied by capital city/large city bonus.