The short and easy answer, at least for the SMALLEST number of hives needed, would probably be one hive. If the hive is big enough, you can graft from it (or use whatever method you prefer), take nurse bees from it to make a starter, then shake them back into the hive above a queen excluder to make a finisher. At the end you will get a number of queen cells.
You can then take some nurse bees and brood from the hive to make up your mating nucs. This is where you will be limited though, as your one hive can only supply a limited number of mating nucs. Or, you could take the q-cells and re-queen full hives with those, therefore not needing mating nucs.
But from there, the more hives you have the better queens you can produce (as well as more queens). A drone hive should be maintained (with genetically diverse stock) to ensure proper mating. A second colony helps to provide extra nurse bees for the starter/finisher. Even more colonies can help to supply the mating nucs. If you are planning on going in cycles, even more colonies would be needed to keep the nucs properly stocked.
So it gets more complicated the more queens (and the better mated they are) that you produce. But it can be done with one (very healthy and very populated) hive.