Mirror number of unread mails in title bar
Solution 1:
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.