how does one find out the moles of NaCl?

Two ways.

If you have the grams NaCl, mols = grams/molar mass = ?

If you have a solution (M) of NaCl, mols = M x L = ?

Of if the solution is in molality(m), mols = m x kg solvent = ?