Scientists determined the number of electrons in an atom through a series of experiments and theoretical developments in the late 19th and early 20th centuries. Key contributions came from Rutherford, who estimated nuclear charge, and J.J. Thomson, who measured the electron's charge-to-mass ratio. The concept of atomic number, introduced by A. van den Broek, linked atomic weight to charge, establishing a framework for the periodic table. Henry Moseley's work in 1913 demonstrated that x-ray spectral line wavelengths corresponded to atomic numbers, reinforcing the significance of atomic number over atomic weight in periodic law. This understanding evolved further with Niels Bohr's research on electron shell organization and G.N. Lewis's discoveries regarding bonding electron pairs, leading to a comprehensive view of atomic structure and electron distribution.