Wrong Unread Message Count in Mail

I recently had the pleasure of having no unread messages in my inbox, yet still having Mail.app showing that I did indeed have unread messages. Now, this usually is not a big problem; however, it does annoy me when something does not work as advertised, as seen in this image:

I scoured each of my folders within all of my inboxes to try to find the missing messages, to no avail. So, I started to search the Menu options within Mail.app and came across the fix.

For me the fix was to ‘Synchronize All Accounts’. See the image below. This option will go through each of the folders within all of your accounts and synchronize with what’s on the server.

When I did this, the ‘missing’ two messages appeared within the folders, thereby allowing me to clean up my inboxes and have no unread messages.

I thought I’d share this fix in case others happen to encounter the same issue.

I'm into everything technology related, particularly anything Apple related. I enjoy programming and tend to lean towards server-based technologies over client-based. You can contact me on twitter, via e-mail, or follow me on friendfeed.