A sodium (Na) atom has 11 protons and 11 electrons.
Conversely, a chlorine (Cl) atom has 17 protons and 17 electrons.
Both ions are stable because they now have a complete complement of electrons (8) in their outermost shells.