Thanks Alberto, this is a great question. You caught us out being lazy!!! If you look carefully in all our papers we tend to define the rho(r), g(r), G(r) and R(r) functions properly, but then when we integrate R(r) to get N(r) we miraculously say "and if you have a simple elemental material this integration gives the coordination number" and move on. The reason is that actual answer is quite complicated and we usually want to just give a really simple intuitive idea of the power of that R(r) function in some simple case and not make it complicated off the bat.
If I find time in the next few days I will write something that takes one through it in an understandable way, but in a kind of "Fermatian marginal note" way the answer is that, on the one hand that it gives the "average" coordination, but on the other hand, if you decompose the sum into a sum over distinct sites (i.e., partials) and you treat each partial separately, it yields the correct coordination with respect to each partial, summed up.