Currently the immigrant spawner aims to reduce your per capita wealth to target number, and will add as many migrants as it needs to do that. The target number increases over the first few waves of migrants. The first two waves target a per capita wealth of 3, the next two target 4, and every wave after that targets 5.
I'm looking to rebalance this, but that's the logic as it stands in 1.2.4
Towers and gatehouses give 3 wealth, tradehouses and barracks give 4. Most other buildings give 2 or 1.