water is H2O, which means 2 H's and 1 O [but judging by the question you're posing, I suppose you already know that..]

the molar mass of H2O is 2(the molar mass of H)+1(the molar mass of O)

Hydrogen's molar mass is 1.01g and oxygen's 16g (both rounded)

2(1.01)+16=18.02g

Now, you say it's only one gram, that will be 1/18.02 of a mole.

Each mole has 6.022*10^23 atoms [Avogadro's number].

moles*number of molecules per mole=number of molecules!

so

1/18.02*6.022(10^23)=VERY approximately (10^23)/3, or ~3333333333333333333333.33333.... molecules. Scientifically expressed: 3.333*10^22

result is very approximate, to find the actual number do

6.022(10^23)/18.02.