Try these two solutions:
From the Finder hold down the <option> key and click on Go, this will show ~/Library/ in the list of items (it is hidden by default.)
Move the folder ~/Library/Mail/ to the desktop or another convenient location.
Launch Mail.app
From the File Menu choose Import Mailboxes...
Choose Import Data from Apple Mail
Navigate to ~/Desktop or wherever you moved ~/Library/Mail/ to
Click on Choose
Wait until it imports
Or
In a Finder window, navigate to Username/Library/Mail/V2/MailData, and
delete any file that begins with Envelope Index, such as "Envelope
Index" or "Envelope Index-shm" or "Envelope Index – wal". In my case,
I had all 3 of these Envelope indexes, and moved them to the trash.
NOTE: When accessing Library, keep in mind that your home Library is
hidden in Lion. To access it, from the Finder, hold down the Option
key and click on the Go menu. The Library should be then be shown in
the menu and you can select it.
Restart Mail. It will then rebuild a new list of messages, which can
take some time, so be patient. Another NOTE for EXCHANGE users:
After removing the Envelope Indexes, my Exchange account email content
was blank. To revive it, I had to delete my Exchange email account and
add it again fresh. After adding it from scratch (and the download
took a while since I have about 12K messages), the mystery Unread
Message notifications were gone.