If you use Gmail as your primary email client, constantly going to your Inbox to check if you have received an email can be tedious. Fortunately, there is a setting that displays the number of unread emails in your browser tab.
This option is slightly different from the default number displayed on the Gmail browser tab when in the Inbox.
This number shows you how many unread emails you have in your Inbox, but it only shows you this number when you are actually in inbox. If you are in any other Gmail folder or site, it disappears.
Gmail gives you the option to enable an "unread message" icon in the header that works no matter where you are on the Gmail site.
To activate it, click on the icon with the adjustment gear on the right side of the screen, then select "See All Settings".
Click the "Advanced" tab.
Scroll down to "Unread message icon", click "Enable" and then select "Save Changes".
Gmail will refresh from now on, the email icon on your Gmail tab will always have the number of unread messages, no matter where you are.
See also: How to turn off chat view in Gmail
To turn off this feature, go back to Settings> Advanced and turn off the "Unread Message Icon" option.
Source of information: howtogeek.com