Maximum Number of Buildings: The maximum number of structures you can build on a planet depends on the population of the planet.

Maximum_mines =
   Colonist_clans    ...if Colonist_clans < 200
   Round(200 + Sqrt(Colonist_clans - 200))
                     ...if Colonist_clans ≥ 200

Maximum_factories =
   Colonist_clans    ...if Colonist_clans < 100
   Round(100 + Sqrt(Colonist_clans - 100))
                     ...if Colonist_clans ≥ 100

Maximum_defense_posts =
   Colonist_clans    ...if Colonist_clans < 50
   Round(50 + Sqrt(Colonist_clans - 50))
                     ...if Colonist_clans ≥ 50

Note that you need not permanently fulfill these conditions. You can build factories and beam off clans to a ship. PHost will consider this possibility when checking turn files. However, buildings over the limit as determined from the planetary population will decay at a rate of StructureDecayPerTurn.