The valence shell (the outermost electron shell containing electrons) there are 8 or less electrons. Even if there is place for more electrons, it will only be filled to a maximum of 8 electrons if it is the valence shell. This is called the octet rule.
The K-shell is an exception to the octet rule, as it can only contain 2 electrons. The K-shell instead obeys the duet rule.
The amount of valence electrons give the atom many of its chemical properties. All atoms containing the same amount of valence electrons behave in a similar way, such as which type of chemical bonds they will create. When an atom or ion has 8 valence electrons, it is said to have noble gas shell, making it chemically inert, and very energetically stable.
When looking at the transition metals, we see that the fill their inner electron shells instead of their outer. If we were to look at some consecutive transition metals, the further right we go in the periodic table, each contain more electrons, but they don't necessarily have more valence electrons.
Atoms will spontaneously react to achieve a full valence shell, due to the increased stability due to their lower energy. Read more about this in our article about intramolecular bonds.
Electron dot diagram
To visualize how many valence electrons an atom has, something called an electron dot diagram is used. The electron dot diagram shows how the valence electrons are distributed around the atom.
To draw an electron dot diagram, you start by writing the chemical symbol. You have four sides around the atom. Left, up, right and down. Each side has space for two electrons.
Depending on how many valence electrons the atom has, you put one electron on each side. Thereafter, an additional electron is placed on each side. Visually, it looks like the picture below:
Electron dot diagrams can be seen as a simplified version of lewis-structures for molecules, which we will cover in a later article.