add counter for messages
add counter for messages