It's hard to understand where your point of confusion is. Oxygen gas exists as a diatomic molecule, that is, two oxygen atoms bond to each other, we call that diatomic oxygen. The oxygen atom in water is alone, bonded to two hydrogen atoms. We haven't "lost" the number two, it just doesn't belong because there's only one.
Suggestion: look up a reaction that has diatomic oxygen as a reactant, and water as a product. There are many examples: the production of water from hydrogen and oxygen, or combustion of fuels in oxygen. If they're properly balanced, you'll be able to see where things go.