Answer
The atom has 4 valence electrons.
Work Step by Step
The electron configuration of the atom $$1s^22s^22p^63s^23p^2$$
In most situations, the valence electrons are also those in the outermost occupied shell. So the number of valence electrons equals the number of electrons in the outermost occupied shell.
In that configuration, we see that $n=3$ is the outermost shell.
There are 2 subshells occupied there. Subshell $3s$ is occupied by 2 electrons, and subshell $3p$ is occupied by 2 electrons. In total, there are 4 electrons occupying the outermost shell $n=3$ here.
Therefore, there are 4 valence electrons in this atom.