The atomic number originally meant the number of an element's place in the Periodic table. When Mendeleev arranged the known chemical elements grouped by their similarities in chemistry, it was noticeable that placing them in strict order of atomic mass resulted in some mismatches. Iodine and Tellurium, if listed by atomic mass, appeared to be in the wrong order, and would fit better if their places in the table were swapped. Placing them in the order which fit chemical properties most closely, their number in the table was their atomic number. This number appeared to be approximately proportional to the mass of the atom, but, as the mass/chemistry discrepancy showed, reflected some other property than mass.
The anomalies in this sequence were finally explained after research by Henry Gwyn Jeffries Moseley in 1913. Mosely discovered a strict relationship between the x-ray diffraction spectra of elements, and their correct location in the periodic table. It was later shown that the atomic number corresponds to the electric charge of the nucleus — in other words the number of protons. It is the charge which gives elements their chemical properties, rather than the atomic mass.