If you use chat you should know that chat replies (using your username in messages in general) can lead to an increasing inbox count for the top bar inbox:
This happens if you are not currently (or just inactive some amount of time) in chat. Visiting chat and clearing all the chat notifications (by clicking possibly a several times on the number in circle or sending a new chat message) doesn’t clear the notification from the top bar inbox.
The current behavior is slightly confusing because I see old (already viewed) items as new (not read) in the top bar inbox.
I suggest to not count (substract them) already cleared chat notifications in the top bar inbox.