You can re download Mountain Lion on all your authorized Macs using the same Apple ID used for the original purchase.
It may be necesasry to reformat, restore, or reinstall OS X for Mountain Lion at some point.
Information for that here > Apple - Support - OS X Mountain Lion - Installation and Recovery
I disagree with Carolyn, must be the first time ever, as this has come up a couple times...the purchase of a Mac with ML preinstalled does not constitute the purchase of ML for Mac App Store purposes. You have to repurchase a copy for installation on your other machines. The copy on your new iMac is not tied to your Apple ID but to the machine serial number.