In the Lewis structure, each single bond drawn between elements contain two electrons. The electron dots represent the lone pairs. These are the electrons that take part in the reaction. To obey the octet rule, the oxygen must have eight electrons around it. The hydrogen is exempted from this rule. Therefore, you have to show two electrons.