@since: BuddyPress 2.6.x Added $user_id argument.
Description
bp_total_unread_messages_count()

Output the unread messages count for the current inbox.

Source: bp-messages/bp-messages-template.php:782

bp_get_total_unread_messages_count()

Get the unread messages count for the current inbox.

Source: bp-messages/bp-messages-template.php:794