I have an API for this -- used by Enhanced SMS & Caller ID (voice) and Executive Assistant (widget). Provides a way to access actual unread counts and message content.
If the developer of this app contacted me, I'd be happy to explain.
(
it's too bad all those apps that rely on intercepting notifications don't differentiate between "ongoing" and "event" notifications....
this one could grab the unread count right from the original notification, using AccessibilityRecord#getParcelableData, casting that to a Notification, and reading Notification#number...
)