Play style is really the biggest determinant factor.
When I was in earlier chapters I had many factories, 6 workshops, 16 residences, and 2 armories. Currently I have 8 workshops, 1 factory for each tier of goods, 21 residences, and 4 armories. As I develop further I expect I will add more residences, probably not need more workshops, may have to add another factory in certain tiers, and might add 1 or 2 armories.
The reason I have so many workshops compared to a low factory count is that my military chews through provinces regularly and replenishment eats up fair number of supplies. I only used goods for negotiating during chapters 2 and 3, which is a period when fighting is extremely difficult, and have developed sizable stockpiles. Early in the game I traded at a profit and had a number of advanced players that were willing to take such trades; I have since returned the favor by posting many trades that are at a loss for me. The stockpile and minimal usage of goods is what allows me to have so few factories.
The lower number of factories allows me to dedicate more citizens to the armories and higher level barracks. My barracks is at the maximum level I can get and I have an ancient wonder to make it produce even faster, and it just manages to keep up with my desire to have troops. Most people opt to have the barracks at a lower level and only 2 armories. They then devote more space to factories as they need the goods to do negotiating.