I have a geometry which can be summarized in one volume (V1) under another volume (V2). I want to record how many particles arrived at the V1, and also how many arrived at V2. The goal is to measure the transmittance through the whole geometry. I just selected two volumes of the whole geometry because, these are the target to measure the transmittance. I mean, V1 in the beginning and V2 in the end.

How can I measure how many particles go through the V1 and the same for the V2. Is there any GEANT4 example which makes this process?

I will thank any answer.