get the number of valence electrons in an atom