This used to work, but at some point it stopped. I have labels defined in Gmail. In Mail.app they show up as folders on the left side, like:
That image shows the
apartments label. The problem is that Mail.app thinks there are 0 message in
apartments, but if I go to Gmail I see 27 messages.
The "Show in IMAP" checkbox is checked in Gmail settings.