Counting basis sets in quantum chemistry
Yes, you have counted the number of basis functions correctly:

    #1s    #2s    #2px    #2py    #2pz    #Total
H1   1                                      1
H2   1                                      1
O    1      1       1       1       1       5


Which as you also counted is 7 basis functions.
As you also correctly state, each of the basis functions will be a linear combination of $n$ primitive Gaussians:

$$\phi(r)=\sum_{i=1}^nc_i\exp\left(-\alpha_i\left(r-r_0\right)^2\right)$$

As you have observed that is what the $n$ in STO-$n$G denotes.