What determines the maximum number of trade routes a city can have?

Solution 1:

Good question; I've had to look this up several times in the past few weeks, and found it in the NEWS file:

MAJOR CHANGES FROM 2.4.x to 2.5.0

[...]

 * The maximum number of trade routes per city is now
   ruleset-dependent. In the classic and (of as RC1) experimental
   rulesets, the limit on trade routes now depends on what technology
   you have. You start with 2 per city, and can add one more with each
   of 'Magnetism' and 'The Corporation'.

The in-game Help should really explain this, but I don't think it supports ruleset-specific information yet.

To be sure, check the effects.ruleset of the ruleset you're playing with. For instance, data/classic/effects.ruleset has:

[effect_trade_routes_base]
type    = "Max_Trade_Routes"
value   = 2

[effect_trade_routes_magnetism]
type    = "Max_Trade_Routes"
value   = 1
reqs    =
    { "type", "name", "range"
      "Tech", "Magnetism", "Player"
    }

[effect_trade_routes_corporation]
type    = "Max_Trade_Routes"
value   = 1
reqs    =
    { "type", "name", "range"
      "Tech", "The Corporation", "Player"
    }