a mole is a number of molecules; 6.022 x 1023 molecules, in fact.
It was invented to make exactly what you ask more convenient:
two moles of a certain molecule consists of two times the number of atoms per molecule in moles of each atom in its compound.
so for two moles of water:
oxygen atoms: 2 x 1 = 2 moles.
hydrogen atoms: 2 x 2 = 4 moles.
Do not forget though that hydrogen and oxygen molecules consist of 2 atoms, so 1 mole of oxygen atoms is 1/2 mole of oxygen molecules, and 2 moles of hydrogen atoms = 1 mole of hydrogen molecules.