How do I fix the email counter on the tag below the task bar?
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.