How to get unread notification / topic count via API?

Okay there doesn’t appear to be an API endpoint for getting the unread or new topic counts for a user. It would be possible to write a plugin that creates a new endpoint that provides those stats. Those counts are coming from this file.