Active and Unacknowledged alarm count

In the perspective of alarm management within the ignition system, I aim to tally all active and unacknowledged alarms across various alarm categories. I've included an alarm header image featuring three icons, each representing a category for which I wish to display the alarm count. Within the alarm table, I specifically need to display counts for active and unacknowledged alarms only. The alarms fall under three distinct categories: process alarms, product alarms, and equipment alarms. Could you guide me on how to accomplish this?