Step-by-step explanation:
A dissociation reaction is defined as a reaction in which a compound dissociates into its constituent particles.
For example,

For a neutral compound, it is required that the charges must be balanced between the combining atoms.
Here,
is the neutral compound as charge +2 on one atom of magnesium is balanced by 2 atoms of
ion.
Therefore, we can conclude that in total the number of ions produced in the dissociation of
compound is 3.