Booming is sacrificing military, defenses, and aging up production in order to rapidly grow your economy.
There's no "number of villagers" to have when you are booming. The question is - Besides always building villagers at the TC, what else do you do to grow your econ?
Example - The Dutch boom by building banks. Assuming the opponent is "only" keeping constant villager production, building banks increases the Dutch economy.
Since banks cost 350 food/wood and food is faster to harvest than wood, bank booming typically involves 10+ vills hunting and using shipments of wood from your Home City to be able to afford banks early. Early in the bank boom, keep 5-6 villies mining gold so the TC doesn't stop producing villagers. Once 2+ banks are up, you don't need any more gold miners in order to keep constant villager production, although you might want to keep them mining in order to afford military.
A Dutch boom build can have all 4 initial banks up by 7:30 or so in the game. At that point, you have 24-25 villagers and 4 banks, which equals about 40 total villagers in production. Nobody but Britain can really match that econ by that point (Portugal could have about 30ish). Of course, you have no real military for 8ish minutes, and it's just not reccomended in smaller 1v1/2v2 games.
Another example - A standard "boom" is to get to Fortress fast and put down 1-2 more TC's. Then primarily focus on having all TC's pumping villagers while also buying a round of econ upgrades at the Market.