In this case, one knows that sodium chloride's formula is NaCl, therefore, the amount of cations is computed via the following stoichiometric relationship, considering the Avogadro's number to relate moles of sodium cations with their actual amount:
wherears one hydrogen atom has a mass of approximately 1 u ,1 mol of h atoms has a mass of approximately 1 gram and wherears one sodium atom has an approximately 1 gram and one sodium atom have approximate mass of 23 u