First you must calculate the number of moles of NaCl
MM NaCl = 35 + 23 = 58
NaCl moles = 10g /58 g/mol = 0,17 mol
By definition, 1 mole contains 6,02 × 10²³ atoms, therefore you simply need to multiply the Avogadro's number by the number of moles
6,02 × 10²³ × 0,17 mol = 1,02 × 10²³