The main problem with using a lot of barracks is that barracks are big users of population. Lots of barracks can hurt your ability to produce supplies or goods. Also, the population will require more housing which will eat up room in your city. It's not a major problem if you want to focus on fighting and you have your city developed well, but it's something to keep in mind when planning.
Take into account the time it takes to produce units. Spearfighters are 20 seconds, other BA units 1 hour, IA units 2 hours, EMA and later units 4 hours, and special units 1 day. This time is reduced a little by your guild's level.
Early on, you'll need more barracks to produce enough units. As you develop your combat boosts and your units get stronger, they can take less damage, so you'll need fewer. The Traz produces unattached units, and those aren't limited by space like your attached units, so you can build up a big reserve of them. The GE also provides some amount of unattached units, and you can win them from DCs. Rogues are a very good way of building up your army since the Hideouts are small, and can be made into smaller Dens, and you typically use 6 or 7 Rogues with one or two units. Combined with the Traz, the usual practice is to make hundreds or even thousands of unattached Rogues so that you can just soak damage with them.