When gases react, the volumes consumed and produced, measured at the same temperature and pressure, are in ratios of small whole numbers. This is a statement of Gay-Lussac's Law.
Here are some examples:
Hydrogen gas + Oxygen gas ® Water vapour
2 dm3 + 1dm3 ® 2 dm3
Hydrogen gas + Nitrogen gas ® Ammonia gas
3 dm3 + 1 dm3 ® 2 dm3
Something had now to be made of this observation. In the early 1800s, the chemical formulas of even simple substances like hydrogen, chlorine, and water were not known with certainty. It was in 1811 that Amedeo Avogadro made the first clear statement of this relationship. In doing so he coined the term molecule, by which he meant an aggregation of atoms. In modern terms, Avogadro's Law says, Equal volumes of all gases at the same temperature and pressure contain the same number of molecules.
See also Avogadro's Law | Avogadro Constant.