implemented message count