Whenever a permanent becomes untapped, that permanent's controller mills a card.
If permanents become untapped during the untap step, Mesmeric Orb’s ability will trigger that many times. However, since no player gets priority during the untap step, those abilities wait to be put on the stack until the upkeep starts. At that time, any “beginning of upkeep” triggers will also trigger. Those abilities and Mesmeric Orb’s triggers are put onto the stack at the same time.