Three. There’s 2 atoms in hydrogen and there’s 1 atom in oxygen.
total number of atoms in H2O: 2H + 1O = 3