I've configured Mail to access Gmail via IMAP. I've also configured Gmail, in it's settings, to limit each IMAP folder to only download 1000 of each folder. The problem is that I have a folder that has less than 1000 messages that has only downloaded. The weird thing is when I go to get account info (right-click on the account in the left-hand pane that displays all your accounts and folders), it shows that folder as having 0 messages.
I end up having to go to Gmail to check messages in that folder.
Here's a screenshot of the problem:
Note how I've highlighted the Web Accounts
folder in the background and how it displays seven messages but that the Account Info pane shows 0 messages.