Auto Show number for ammount of new chat messages

I have a link to my chat on my menu and I would like a number in brackets to show when a new message is posted or at the very least an explanation mark (!). When user 1 send a message it automatically shows user2 and all the other users an (!) or number of new messages in brackets. When user2 views the chat page the brackets disappear and it just says chat however the brackets do not go from all users link.

How is this possible and how would I go about making it work? I have mysql database and the table is chat_chats.

I would also need the link to auto update itself instead of a user having to go to another page for it to update.