How do you determine the number of valence electrons in an atom?