* Magnesium (Mg) has a +2 charge. This means it loses two electrons to become stable.
* Chloride (Cl) has a -1 charge. This means it gains one electron to become stable.
To form a neutral compound, you need two chloride ions to balance the +2 charge of the magnesium ion.
Therefore, there are two chloride ions (Cl-) present in a formula unit of magnesium chloride (MgCl2).