The atomic number of an element was originally just its position on the periodic table. After the discovery of protons, scientists realised that the atomic number of an element is the same as the number of protons in its nucleus.
In the modern periodic table, the elements are arranged according to their atomic number - not their relative atomic mass. This fixed the problems of tellurium (52) and iodine (53) which are in the wrong order if sequenced by relative atomic mass.
In the periodic table the elements are arranged into: