your message table will need a column to mark the messages as being read or not.
Set the initial value for this column to 0
when the user reads a message, you need to update the column to 1
on the page where you display the number of messages, set the recordset to only query records where the read column is equal to 0