Question: how many outer shell electrons does oxygen have?
Answer: By bonding with two hydrogen atoms, oxygen has its 6 outer shell electrons + 2 shared electrons from the hydrogen making 8 (and a filled shell makes a happy atom.