There are four tiers of residences; Pioneer residences, Vassal residences, Merchant residences and Imperial residences. The basics for ascension is that for every 10 residences of a certain tier, 5 can be ascended to a higher tier, with the exception of Imperial residences that has a slightly lower ascension rate of 2 per every 5 Merchant residences.
In order to reach the goal of 4,000 Imperials (to unlock all types of goods and building upgrades), you'll need at least 87 Imperials residences (each within the radii of influence of all attraction buildings, excluding monuments), leaving you with the following split of residences per tier: