Water has a molar mass of 18.01528 g/mol≈18 g/mol.
So, in 18 g of water, there will be
18 g/18 g//mol=1 mol
Since water has a chemical formula of H2O, there will be 2 moles of hydrogen in every mole of water.
In one mole of water, there will exist approximately 6.02⋅1023 water molecules.
So, there will be a total of 6.02⋅1023⋅2≈1.2⋅1024 hydrogen atoms.