An ionic formula is a charge balance. Add ions to each side until the totals cancel, then read the formula unit off the counts.
The beam is a picture of charge, not of mass. It levels out when the total positive charge equals the total negative charge. That is the only condition an ionic formula has to meet.