fixed sharing message sent counts query logic