Answer
Gaining or losing neutrons would not affect an atom's atomic number, as the atomic number is determined solely by the number of protons.
The atomic number is fixed by the number of protons. Changing the number of neutrons only changes the mass number and creates an isotope of the same element, it does not change the element's identity or its atomic number.