This happens on occasions. When I receive an email, it reaches the inbox, the unread column says (1) under Inbox. The email gets filtered to Folder1 but unread count is still (1) under Inbox and 0 (it doesn't actually show 0) under Folder1. When I click on Inbox, the unread count is reset to 0. The I click on Folder1 and the unread count is up to (1). Basically the unread count doesn't always update after filtering unless I click on inbox and then the target folder. Reproducible: Always
In addition, the notification of new email only appears after I have clicked on target folder ( in my case inbox/bugs/kde) and unread count was corrected.
The incorrect unread count even survives restarting kmail. It does get autocorrected if I restart akonadi.
This bug has never been confirmed for a Kontact version that is based on KDE Frameworks, except possibly a Technology Preview version 5.0.x. Those versions differ significantly from the old 4.x series. Therefore, I plan to close it in around two or three months. In the meantime, it is set to WAITINGFORINFO to give reporters the opportunity to check if it is still valid. As soon as someone confirms it for a recent version (at least 5.1, ideally even more recent), I'll gladly reopen it. Please understand that we lack the manpower to triage bugs reported for versions almost two years beyond their end of life.
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.1 aka 15.12, preferably more recent), please open a new one unless it already exists. Thank you for all your input.