How to output the contact number between particles?

Hello, everyone!
I want to output the number of contacts between particles. Can I achieve this by outputting force chain data? Thank you!
I tried to output the FORCE in the force chain data_ CHAIN_ GLOBAL_ ID1 and FORCE_ CHAIN_ GLOBAL_ ID2, but it is not possible to determine which is the total number of contacts for the output particles.

I carefully studied it, global_ID output is the particle number of the force chain formed by two particles, and cannot represent the number of contacts between particles. May I ask how experts can derive the contact number between particles? Thank you!