Sample variance: degree of freedom argument

Estimates of statistical parameters can be based upon different amounts of information or data. The number of independent pieces of information that go into the estimate of a parameter are called the degrees of freedom. In general, the degrees of freedom of an estimate of a parameter are equal to the number of independent scores that go into the estimate minus the number of parameters used as intermediate steps in the estimation of the parameter itself (i.e. the sample variance has N-1 degrees of freedom, since it is computed from N random scores minus the only 1 parameter estimated as intermediate step, which is the sample mean).

-Wikipedia

The sample mean is an estimated parameter, not a random variable. Constructing the mean as a linear combination of your existing variables does not add to the dimensionality of your system (I'm not sure if you have any prerequisite linear algebra).

I hope that makes sense