My IMAP account in Apple Mail shows messages that I previously marked as read as unread.
This is a common bug with Apple Mail. The mail application fails to correctly set the read flag on mail in your IMAP account.
At the time of writing Apple has not fixed this error.
A work-around is to scroll through each email. This resets the read flag to unread for each message.
Until Apple fix this issue in Mail we recommend using POP3 or an alternative mail application like Thunderbird or Entourage.