How do I fix the email counter on the tag below the task bar? In the mail window, you can put a tag to your mail boxes below the taskbar (see screenshot) that you can click to go to that mailbox.  The tag has a number indicating the number of unread messages.  

For me, this number is always wrong.

I have tried:
1. Erasing deleted messages
2. Rebuilding the mailboxes
3. Moving messages in and out of the mail box

to no avail.

Yes, it is a small thing, but it should work and if there is an easy way to fix it, I would.
restating my comment as an answer for completeness's sake:

"Inbox" in the "mailboxes" bar does not refer to the folder called "Inbox" but to the whole folder structure you might have created inside the "Inbox" or several "Inbox" folders, if you have multiple mailboxes configured. 
All those unread items which are not in the actual "Inbox" folder will be in one of those subfolders, instead.