Calculate coordination number of inhomogeneous system from RDF

Dear All
I want to calculate the coordination number from RDF by using the following equation: 
{\\displaystyle n_{1}=4\\pi \\int _{r_{0}}^{r_{1}}r^{2}g(r)\\rho \\,dr,}
However, the particles in the system is not evenly distributed. There are three layers in my system which are layered in the order of 1-2-3, the reference particle is located in layer 2, particles coordinated to the reference particle are located in layer 1 and layer 3. How should I calculated the density rho? The volume in \\rho =N/V should be the total volume of layer 1+2+3 or just the volume of layer 1+3? 

Thank you!

All the best,
Jingjing