The carbonate dianion MUST have 2 more electrons than it does nuclear protons. Let’s see if it does.
The number of nuclear protons are the number of positively charged particles contained in atomic nuclei. ##Z##, the , ##=6## for carbon, and ##8## for oxygen. In the carbonate atom nuclei there are therefore 30 positively charged protons.
So how many electrons on carbonate? There are 6 from carbon, 24 from oxygen, PLUS 2 extra negatively charged particles from the formal charge on the anion. 32 electronic charges (##-32##) versus 30 protonic charges (##+30##). There is a formal charge of ##-2## on the carbonate anions, the which we conceive to be on the oxygen atoms (the doubly bound oxygen is neutral, whereas each of the singly bound oxygen atoms bears a negative charge), to give ##O=C(-O^-)_2##
Of course this assignment of charge is a formalism; and we would distribute the charge over the oxygen centres by .