The electrons in the outermost shell of an atom take part in all the chemical reactions given by that element. Thus, these electrons describe the combining capacity (or valency of an element). That is why the electrons in the outermost shell of an atom are called its valence electrons. For example, sodium atom has been an electron configuration of 2, 8, and 1. The sodium atom is shown.
The outermost shell, i.e., Make-shell of sodium contains only one electron. So, the number of valence electron in sodium is one. Similarly, in this case of chlorine, there are seven electrons in its outermost shell (M-shell). So, the number of valence electrons in chlorine is seven.