What is the difference between the atomic number of an element and number of valence electrons?
Electrons are arranged in shells or energy levels. The outer shell is known as the valence shell, and is where the reacting electrons reside - those that form bonds with other atoms. It is a full outer shell that satisfies an atom and stops it from reacting (easily) again.
The atomic number is the total number of protons in the nucleus, which is equivalent to the total number of electrons - not just those in the valence shell.