The chemical properties of an element depend upon its valence electrons.
The valence electrons are the highest energy electrons in an atom, those to which the smallest amount of energy must be added to remove the electron. In noble gases like xenon, the valence electrons are those in the outermost shell.
Many references state that the number of valence electrons is equal to the group number. In the IUPAC numbering system for the periodic table the numbers range from 1-18, there are not 18 valence electrons. When using the IUPAC numbered periodic tables, the number of valence electrons for the representative elements on the right side of the table is found by subtracting 10 from the group number. To make it simpler yet the number of valence electrons is the digit in the ones place of the group number.
Beginning Valence Electrons [Local]
For representative element metals, the number of valence electrons corresponds to the charge of the most stable ion until period six is reached. The 4f electrons tend to shield the 6s electrons that are considered valence electrons for elements such as thallium, lead, and bismuth. Due to this shielding (also called the lanthanide contraction) thallium, lead, and bismuth exhibit a most stable ion with a charge two less than their number of valence electrons, i.e. Pb+2 instead of Pb+4.