What do the small numbers subscripts in the codes represent
A chemical subscript indicates how many atoms of the preceding element, or how many copies of a parenthesized group, appear in the formula unit being represented. An omitted subscript normally means one.
Meaning and context
In H₂O, the two applies to hydrogen and the unwritten one applies to oxygen. In Ca(OH)₂, the two multiplies the whole OH group, giving two oxygens and two hydrogens per represented formula unit.

Examples and usage
A coefficient is different. In 3H₂O, the three counts three water molecules or three corresponding amounts in an equation, multiplying the entire formula. The formula still describes water rather than a different compound.
What to check
Changing a subscript generally changes the substance or species being described. Balance an equation with coefficients rather than editing formulas. Also distinguish subscripts from superscripts used for charge or isotope notation.
Explore more: Chemistry and Elements