To determine the number of valence electrons, we need to look at the highest energy level, which is the outermost shell. In this case, the outermost shell is the 2nd shell, which contains the 2s and 2p subshells.
The 2s subshell has 2 electrons, and the 2p subshell has 4 electrons. Adding these up, we get a total of 2 + 4 = 6 valence electrons.