Alarm counter by associated data

I recommend you explain what you are ultimately trying to do. If you are just wanting a count of alarms for a specific path, that is relatively easy and there are many posts on this forum already about it.