Improving counting and duplicate messaging