Question: how many electrons does the nitrogen atom have in its outer shell?
Answer: The number of valence electrons is the number of electrons in the outer shell, that the atom uses for bonding. Nitrogen has 5 electrons in its n=2 (outer) shell.