Gases have very large numbers of molecules. By convention, chemists define a mole as the number of atoms or molecules in 12 grams of the isotope carbon 12, which has an atomic mass of 12 u. Moles are very convenient as a unit of measurement for a substance.

click to enlarge
Avogadro's number NA is 6.02 x 1023 mol-1, which is the same as 6.02 x 1023 atoms or molecules per mole. It is based on a theory by Italian physicist Amedeo Avogadro (1776-1856) . He had learned about Gay-Lussac's Law, and conjectured that all gases with the same temperature and pressure at the same volume also have the same number of atoms or molecules. This conjecture is known as Avogadro's Principle, and the number has been validated experimentally.
Thus 1 mole = 6.02 X 1023 elementary units. When we say 1 mole or mol of oxygen or 1 mol of a compound such as air, we know that we mean 6.02 x 1023 atoms of oxygen, or 6.02 x 1023 atoms of air.
The molecular mass is the mass of one molecule of a substance. A mole of water (dihydrogen oxide or H2O) has two molecules of hydrogen and one molecule of oxygen. As can be seen from a periodic table, Hydrogen has an atomic mass of 1 u and oxygen has an atomic mass of 16 u. Water therefore has a molecular mass of 18 grams, since [(2 x 1) + (1 x 16)] = 18 grams. For a mole of carbon dioxide (C02), which has one molecule of carbon and two of oxygen, the molecular mass is [(1 x 12) +(2x16)] = 44 grams.
The mass of one mol is referred to as the molar mass. The molar mass M of one mole of a substance is related to its molecular mass m and Avogadro's number by the relationship
1) M = mNA