I've planned to build a plugin that simply updates the favicon with a counter when the notification counter changes, but I found out that this never happens (except when you reload a page).
Instead of that, Vanilla periodically polls for new notifications only to show an information popup.
At first I've tried some libraries out there that can manipulate the favicon but I've rewritten that functionality because I do not need all those features here.
The plugin expects your favicon to be linked like that:
But if you have set it with /settings/banner, it will be linked like that anyway.
Sources on GitHub