Account shows false no. of unread emails

When deleting an email before it is marked as read, the account still shows as having unread emails

Emails not read even if deleted are still unread unless you then read them in the deleted folder.

Does NOT make sense. I could understand it if it increased the no. in the trash folder, but not showing as not read in the inbox where the email no longer is.

Another thing I forgot to mention: When restarting the client, it is shown as no unread messages in the folder in question (inbox). And logically, if deleting eg. 5 messages without reading them, the no. of unread messages in trash should increase by 5. Sometimes it does, sometimes not.