The Rutherford–Bohr model of the hydrogen atom (Z = 1) or a hydrogen-like ion (Z > 1). In this model it is an essential feature that the photon energy (or frequency) of the electromagnetic radiation emitted (shown) when an electron jumps from one orbital to another, be proportional to the mathematical square of atomic charge (Z2). Experimental measurement by Henry Moseley of this radiation for many elements (from Z = 13 to 92) showed the results as predicted by Bohr. Both the concept of atomic number and the Bohr model were thereby given scientific credence. The atomic number is the number of _z_ an atom.
Two independent variables could change at the same time, and you would not know which variable affected the dependent variable
Remark
The short Answer is 6. That's why the ion has a charge of minus 2. Oxygen is doing it's best to have its outer ring have 8 electrons which is the number of outer electrons contained in the outer ring of the Noble Gas Neon.
Answer 6.
This info tells us if it stable or not and it tells us how many electrons it need to be stable.