Depends really I guess. When I'm playing on noble I usually have one or two units on a city, usually something like Archers or Machine Guns or something meant to defend. Recently as I've been on higher difficulties I've been using 3-6 units. Usually a few meant to defend and then a melee unit or two as well. (Not that I'm winning on these difficulties But I haven't lost a city yet!) Of course it changes based on where the cities are. I remember in one game I played my capital was in no danger what so ever, and even when I was warring against four other civs at once, I didn't have a single unit on my capital, but I had like 10 on border cities. As for eras, it's usually the same for all of them. >.> Maybe less in the later eras just cause I have more out conquering at that moment.