We can determine the number of moles of an ion based on their molecular formula. Let me show you some similar examples:
1 mole of NaCl has 1 mole of Na+ and 1 mole of Cl-
1 mole of Na2SO4 there are 2 moles of Na+ and 1 mole of SO4^2-
So if we try to relate this with your compound, we can see that there are 1 mole of CO3^2- and 1 mole of Ca2+.
in short, in 1 mole of CaCO3, there is 1 mole CO3^2-