For an Arcane Mage you want to cast Arcane Blast 4 times to get the maximum stacks of Arcane Charge. Then you want to cast Arcane Missile X times. X is the number of Arcane Missile charges and can be anywhere from 0 to 3.
Is there some way to write a macro that will cast Arcane Missile X times when you don't know the exact value of X or perhaps some other way to handle this?