Thunderbird and Gmail - Unread message count
This is more of a generic setting than a setting for Gmail, however, since I started using IMAP only after Gmail offered it I’ve realized it only now. If you use the Archive+Label combo in Gmail to replicate the feeling of folders then you might have noticed after you’ve set up IMAP in Thunderbird that all the mails that come to your inbox show up with a nice count (n) in brackets. On the other hand, none of the mails which get automatically archived and assigned to labels get displayed.
Its only when you click on a particular label does it tell you if any new mail has arrived. This gets annoying when you have quite a few labels. So as an update to my previous post, I found this setting and thought I would mention it here if anyone else wanted to know.
In order to get the unread message counts on all your labels go to “Tools->Options->Advanced->Config Editor” and type in “imap” into the filter box.
The first setting you see is “mail.check_all_imap_folders_for_new” and it is set to false. Double click it to set it to true. Restart Thunderbird and do a “Get Mail->Get All New Messages”. Now if there are any unread mails in any of the labels, it will display them as well (since it has now checked all the IMAP folders you are subscribed to.

Thank you so much for this! It was quite frustrating to only get a notification in the Inbox, only to check a label later and find 10 e-mails in it.
Now if I could just figure out how to stop Thunderbird from saving multiple draft copies and failing to remove them from Drafts once the e-mail is sent it would be perfect.
@Gabriel
Yep, I found that rather annoying too. I never noticed the multiple draft copies problem you mentioned. If I open a draft, make changes and save it again, it overwrites the previous draft.
Great tip, keep the good work!
This was just what I needed to know. Thanks for posting this!