Mirror number of unread mails in title bar Is there a way to show the exact number of unread mails from the Mail.app icon also in the title bar? Note that this is not the same as showing the number of unread mails in inbox, since I can change the folder to something else like a smart mailbox.

(A script which outputs this number would also be okay; I could write a menu bar item around this myself.)

Update: Alternatively, a script which outputs the number of unread mails for a user-definable smart mailbox is also okay. All example code I’ve seen so far only works for non-smart mailboxes.
You can obtain the number of unread items with the following AppleScript:

tell application "Mail" to get the count of messages of mailbox "INBOX" of account "Me"


As you mentioned you could write a menu bar item, you could use this AppleScript for it.

Alternatively, you can do this with Mail Unread Menu.
However, I'm not sure if it works with Mavericks.