message counting