Count the number of remaining messages