Given a list of notification events for a mobile app, return the unread badge count after processing all events. Each event is a list where the first value is the event type: "receive", "read", or "clear". A receive event adds a notification with a unique integer id, a read event marks that id as read if it exists and is unread, and a clear event removes all unread notifications. Return the final unread count as an integer.
Input: events = [["receive", 101], ["receive", 102], ["read", 101]]
Output: 1
Explanation: Notification 101 is read, so only 102 remains unread.
Input: events = [["receive", 5], ["receive", 6], ["clear"], ["receive", 7]]
Output: 1
Explanation: `clear` removes all unread notifications, then notification 7 is added.
1 <= len(events) <= 10^5receive and read, event format is [type, id] where 0 <= id <= 10^9clear, event format is ["clear"]receive events