The best defensive mix if units as far as I can tell:
One cannon / arty in a City. If coastal, adding a galleas/frigate is recommended. This would allow 3 ranged attacks from the city and both units are 'protected' by the city and wont take damage unless they leave. They can leave of course, but its wise to move the arty on roads so you can setup/fire more quickly.
Outside the city: Cross bows upgrade to Gatlings. These are superb defensive units with some ranged backup (in the City), The upgrade path since BNW is excellent, and goes all the way to modern bazooka units. It is possible to have range promoted (or attack x2) Gatling units and it carries to machine guns as well. with the right terrain, this is all you need on defense until air units become a reality. On flat terrain, it might be a good idea to have some extra infantry / cavalry units, but even then, only if Shaka is right next door.
Once air units enter the theater, you will want iether a couple of fighters, or AA guns. Destroyers can work as the third AA unit. I prefer AA guns because they work as infantry too, but Fighters can be better for coastal cities because they can attack naval units.
I find that when I am playing peaceful, with 4 cities, 8 units is about right until I need either a navy or an air force. If you have an early navy then 12 might be the right number, the extra cost is easily offset by cargo ships vs caravans. These are minimal estimates, you could easily have more.