At first reading this statement might seem correct. The formula for MgCl2 is indeed that given. However, in the solid form the ions are held together in a lattice, in which case each magnesium and chloride ion is linked to a number of other chloride and magnesium ions respectively. The details are beyond the scope of the syllabus at present, however a more detailed understanding of this can be located at the Chemguide website (click the link to access from here).