Are number of molecules per unit volume constant (say in water)? I have a very basic doubt. I knew that
$$ \rho = \frac{m}{V} $$
And since mass is constant so volume may decrease or increase depending upon density. But suppose I have water in a beaker and I read it somewhere while trying to understand some concept (Surface tension) that no. of molecules in upper layers of water surface is lesser than that of the layers present below.
Consider in the case of water, H2O molecules are attracted to each other by Hydrogen bonding. And since the vessel surface area is same, How can be the number of molecules different in one layer since It would imply the gaps left out in the layer?
 A: 
Are number of molecules per unit volume constant(say in water) ?

No. The density of water changes with temperature - between $0^o$C and $100^o$C it changes by about 4% (see https://en.wikipedia.org/wiki/Water_(data_page)). Since its density (which is mass per unit volume) changes, then the number of molecules per unit volume must change as well.
But I think you have misunderstood the explanation of surface tension. Surface tension is not due to any change in the density of water molecules at the surface of the liquid.  Instead, surface tension arises because the distribution of surrounding water molecules is asymmetric for a molecule at the surface. As this Wikipedia article says:

Surface tension results from the greater attraction of liquid molecules to each other (due to cohesion) than to the molecules in the air (due to adhesion)

A: 
I read it somewhere while trying to understand some concept (Surface tension) that no. of molecules in upper layers of water surface is lesser than that of the layers present below.

Yes. This is due to the effects of gravity on water pressure. Water pressure increases with depth because of the weight of the each succesive layer of water. As pressure increases, the water molecules squeeze closer together so there are more molecules of water for a given volume at the bottom of the glass than the top:
`$$\frac{ΔV}{V_0}=\frac{−ΔP}{B}$$
Where B is the bulk modulus of water, $\Delta P$ is the pressure difference, $V_0$ is the original volume.
A: Yes, this is evident by water supply in household or electricity made from reservoir or dam. In fluids, density of lower level is high and that creates pressure and cause of viscosity. This change in density with depth of fluid causes pressure gradient, and this may be cause of gravity. Yes, gravity is similar to buyoant force.
Now you say that I am using gravity to explain gravity as pressure created by weight. No this is not, here density causing gradient and everywhere mass is measure of matter contain. Other way is that mass is same, but volume measuring from a point causes change in density.
