Is the following definition of the variance of the number of points correct? I have been asked to calculate "the variance of the number of points" in the following pictures, inside the circles:

I was looking for the definition of "the variance of the number of points" in the literature, which I found this one:
The variance of a set of points is the sum of the squares of the distances from each point to the centroid of the set.
Is this the correct definition of "the variance of the number of points"? (Intuitively, one also expects the division by the number of points, which is absent in this definition.)
EDIT
The pictures are taken from here. For example, it says the variance of the number of points in the left picture scales as $R^2$, but it doesn't give any definition of the variance of the number of points and how it is calculated.

The answer is in a paper by Torquato on hyperuniformity, linked from the Wikipedia page that you cite. In 2 dimensions as in your diagram, it's the variance of the number of particles among multiple random circles of radius $R$ (taken from within a very large area, not a limited area as might be implied by the squares in your diagram).
It's the standard formula for the variance: the difference between the mean of the square of the number of particles and the square of the mean number of particles. Quoting from page 4 of the paper:

the number variance $\sigma_N^2(R) \equiv \left< N(R)^2\right>  - \left< N(R)\right>^2.$

The statistical issue here is that for a Poisson distribution, with independence among all the particles, the number variance equals the mean value. In that case, as the sampled area increases with $R^2$, both the mean number of particles and the variance scale with $R^2$. With a hyperuniform distribution, the variance of the number of particles scales more slowly than that. This can be extended to any d-dimensional Euclidean space.
Your far left example seems to be designed to represent a Poisson distribution. The center example is evidently a hyperuniform but not completely regular distribution; to calculate its variance you would need to know a formula for the distribution or have a simulation. The rightmost example is for a uniform square lattice; Torquato notes that the variance then scales approximately with $R^{d-1}$ (with $R$ in your 2-dimensional case), as the fluctuations among sample are mostly near the boundaries of the sampled regions.
