Here's how to figure that out:
* Atomic Number: The atomic number of an element tells you how many protons it has. Magnesium's atomic number is 12.
* Neutral Atoms: In a neutral atom, the number of protons (positive charge) is equal to the number of electrons (negative charge).
* Therefore: A magnesium atom has 12 electrons.