Calcium Chloride has the formula
Each formula unit, when dissolved in water, produces one calcium ion and two chloride ions. This give us the unit factor 1 CaCl2/2 Cl-.
One mole of particles of any kind is equal to 6.02x10^23. This gives us the unit factor 1 mole/6.03x10^23 ions.
Multiplying the number of chloride ions by these two unit factors will give moles of CaCl2 formula units:
(5.89x10^25 Cl- ions) x (1 mol/(6.02x10^23) x (1 Cl-/2 CaCl2)
= 48.9 moles of CaCl2
In order to solve problems like this you need to write the formula of the compound so you know the subscript on the ion in question. Since the calcium ion has a charge of +2 and the chloride ion has a charge of -2 (Cl alone is -1), the formula CaCl2 results in a neutral compound.
The term "formula unit" is used in place of "molecule" because ionic compounds don't exist as discrete molecules. The formula is the simplest ratio of ions.