First, remember that:
1 mol of any compound is the same thing as the molecular mass of the compound.
So, we could say that 1 mol of H2O is equal to the molecular mass of H2O, which is 18.001g/mole.
Given that we have 180g of water, we could write:

Therefore, there are 10 moles of water in 180g of water.
To convert grams to moles, we just divide the amount in grams we have by the molecular mass.
