Coefficient in front of molecules in a chemical equation In a chemical equation representing a chemical reaction what do the numbers in front of the molecules of compound and elements indicate? Do they signify number of molecules or moles or volume?

Example : $$\ce{ 2H_2 +O_2  -&gt; 2H_2O}$$

Here does the "2" before $\ce{H2}$ and $\ce{H2O}$ indicate number of molecules or moles or volume?
In a particular chapter in my textbook it was written that they indicate number of molecules(atoms) but in a later chapter the numbers were being treated as if they are number of moles or volume.
There's the trick: it's all of them.

The coefficients are a ratio. For every two unit of hydrogen molecule, you need one unit of oxygen molecule, and the result is two unit of water molecule.

That unit is often the particle itself, whether it's an atom, a metal ion, a more substantial molecule or even a protein or enzyme. It can also be the volume (for ideal gases under the same conditions), the moles used in reaction, or molarity in solution.

Simply remember that the coefficient applies to the item following it as a whole. As long as the ratio between coefficients is the same, you can use any unit that maintains it.