Mass of sodium :- 23 grams
Mass of Chlorine :- 35.5 grams
Mass of NaCl :- 58.5 grams
mass given :- 25 grams
moles :- 0.432 ( given mass/ ionic mass)

All compounds are molecules because a molecule is 2 or more substances/elements combined and a compound is 2 or more elements combined. But not all molecules are elements because some molecules are just combined substances with no elements combined at all.