I think you'd have to use the (somewhat tricky) REGEDIT function. I still have nightmares of using to test relative combat power to settle some of the AI-AI wars more dynamically.
You can use it to create categories and to count values across defined areas or the globe.
Now we hit the problem, even when the AGEWIKI was available, this was a tricky one to get right, without the AGEWIKI I'm not even sure of the syntax so to capture the CP of your fleet, vs everyone else's fleet on T120. Or your coal etc.
If you want to play around, look in the Balkan event files, there are a few instances of it in there, may help give you a start.