I want to display the unread-message count on a tab bar item.
What should be the max badge count?
What should be displayed when the count exceeds that max?
Max count should not exceed 2 digits for unread messages, i.e. not more than 99. When the count exceeds 99 display 100+. When the count exceeds 999 display 1k+ etc.
When displaying a counter I would consider primarily three elements:
About the first point, I consider that it depends on the type of the messages: iMail unread email counter goes up to effectively count how many messages are unread (=lots of noise). Gmail app on the contrary, if the account is setup with the 'important' folder, only counts the messages that are marked as important. Users reading the unread counter in the Gmail app knows that those are important emails so that number is always informative of 'important' actions still pending.
In the case of a 'less critical' unread information counter, e.g. number of notifications from my connections in my favourite social network, I can expect that after a certain number of actions, the counter loses meaning. In these situation the counter could stop at e.g. 20+
Limiting the counter to e.g. 20 or 99 it's going to be useful in case your performances decrease if the unread messages are high. In this case find what's the maximum number before this decrease is noticeable by users, until you have time to optimise it and increase again the counter max limit.
In terms of visual representation of the actual counter, one common pattern is to have a '+' symbol (check e.g. Facebook left sidebar notification http://mlmdreamsaver.com/vicki-berry/wp-content/uploads/2012/06/fb-notifications3.jpg ). This is useful to effectively communicate to the user that the counter is not showing more than 20 elements.