Though Gmail shows number of unread messages in your inbox on the title of tab, this may not be visible when too many tabs are opened or when you’re using  Google Chrome’s Pin Tab feature for Gmail which only shows tab’s icon, for that Gmail added Unread message icon to its labs features.

Unread Message Icon

Unread message icon for Gmail embeds number of unread messages to the Gmail’s icon as shown above. You can enable Unread Message Icon by visiting Labs tab in Settings after signing into your Gmail account.