Youre finding the number of molecules that make up that mass.
So first, you want to find the molecular mass (look at periodic table) of MgCl2 first, then divide mass (24.2g) by it to find moles.
moles=mass/Molecular mass then multiply the moles by avogadros number.