It is not necessary to say so.
You can define atomic number by any way in case of atoms as no. of protons is equal to the no. of electrons.
While in case of ions, it is necessary to define the atomic number as the number of protons only. This is because, in a particular ion of any atom, the number of protons remains the same but the number of electrons changes.