Answer: eight (8), for most atoms.
Explanation:
Atoms gain chemical stability by completing the highest energy level with all the electrons it can have, which is 8 for most atoms.
The elements of the first period (row 1), hydrogen and helium, have outer energy level, n, equal to 1.
So, since n = 1, the atoms of hydrogen and helium (in the ground state) fill the 1s orbital, so they need just two electrons to be chemically stable. That is why helium, having 2 electrons, is a noble gas, and hydrogen, having 1 electron, just needs to add 1 more electron to be chemically stable like helium.
For period 2 through 7 of the periodic table (n = 2, n=3, n =4, n =5, n = 6, and n = 7), the outer energy levels can hold 8 electrons. That is why the noble gases Ne, Ar, Kr, Xe, Rn, and Og, each with 8 electrons in the outer energy level are chemically stable.
Here you have two examples to see how this works: