simple javascript code to get count of message between you and your friends