To do this, we will do some simple conversions.
First, find the amount of grams in one mol of H2O.
Per hydrogen atom, there will be about 1 gram. Per oxygen molecule, there will be about 16 grams.
1 x 2 + 16 x 1 = 18 grams per mole.
Then we will find home many moles we have.
40/18 = 20/9 moles
Because there are 6.022 E23 (Avogadro's number) molecules in one mole, we will multiply the amount of moles times this number.
20/9 x 6.022 E23 = 1.34 E24 molecules
The final answer is 1.34 E24, or 1.34 x 10^24 molecules.
Hope I helped!