Yes, you can have two monitors (the built-in monitor plus a second) connected to your iMac, as explained at Apple.com/imac
Beyond two monitors connected to a single computer, you will want to buy a Mac Pro, not an iMac. The Mac Pro has expansion slots (PCIe slots specifically), which means you can plug in more video cards for more monitors. The Mac Pro has four PCIe slots. If each slot is filled with a video card, and each card supports two monitors, you can have a total of 8 screens connected to your Mac Pro. This type of configuration will work well.
In fact, you might be able to add even more if you use an expansion chassis (for example here's one from Cyclone) to give you 8 more PCIe slots. Start with the built in 4 slots, subtract one for the cable to the expansion chassis, then add 8 on the chassis, and that gives you a total of 11 PCIe slots possible, or 22 connected screens. Note that I've not tested this kind of configuration--you'd be pushing the boundaries with this kind of setup, but it sure would be fun.
Trevor