It is actually something standardized more so than theoretical, however in terms of atoms in general the electrons are based on the amount of electronic shells that an atom has and the amount of electrons that atom can accommodate. In the case of sodium, it has three shells with 2 electrons on the first shell which is the maximum, 8 on the second shell which is also the max and 1 on their final shell So simply put an ATOM of Sodium (Na) has 23 electrons because it has 23 protons which is a fact <span />
The amount of energy required to remove the most loosely bound electron in1 mole of an atom in its neutral gaseous state. Atomic radius is smaller, great nuclear charge (pulling power of protons on less electrons)