Atoms and molecules are far too small to count one by one, so chemists count them in moles. One mole of a substance contains the Avogadro constant number of particles, which is 6.02 × 1023. The particles may be atoms, molecules, formulae or ions, depending on the substance.
The mole is also linked to mass. The mass of one mole of a substance, in grams, is equal to its relative particle mass. For an element this is the relative atomic mass (Ar), and for a compound it is the relative formula mass (Mr).
Carbon has an Ar of 12, so 12 g of carbon is one mole and contains 6.02 × 1023 atoms. Sodium has an Ar of 23, so 23 g of sodium contains the same number of atoms. Water has an Mr of 18, so 18 g of water is one mole of water molecules.