particle counting in "particlesInTube"

Hi all,
I am working on the “particlesInTube” example and I would count the number of particles injected in the domain, and ones absorbed in each timestep.
I guess I have to use the functionals that inject and absorb the particles (“AnalyticalInjectRandomParticlesFunctional3D” and “AbsorbParticlesFunctional3D”), but I don’t understand how.

Could somebody help me?

Thanks in advance.