How can you determine the number of valence electrons an atom has?
In which Group does it lie on the Periodic Table?
For the first 3 short Periods, the Group, i.e. the column in which the element lies, tells you precisely how many valence electrons on the element. Try it out: hydrogen, lithium, sodium, Group I elements, 1 valence electron; beryllium, magnesium, Group II elements, 2 valence electrons; Group 13 (,or IIIA), 3 valence electrons, Group 14, 4 valence electrons, etc.
Note that you will always have access to a Periodic Table in a Chemistry or Physics exam; you should be able to learn how to use the Table to predict and rationalize electronic structure.