Question: how many electrons are needed to fill the outer shell of nitrogen?
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.