Calculate the number of read messages based on user ID

Previously would count the number of messages read by all users - resulting in blank pages