How can you use the periodic table to determine the number of valence electrons an element has?

Elements are located on the periodic table based off of their atomic number, but the vertical columns they are in (groups) show how many valence electrons they have. If an element were in Group 3 of the periodic table, it would have 3 valence electrons, and so on. This doesn't apply to the Transition Metals, so one should skip straight to Group 14, where the elements all have 4 valence electrons. Group 15 has 5, Group 16, 6, etc. The one exception to this is Helium, which is in Group 18 but only has 2.