Are you using "Classic" or "Normal" mail mode (in Mail Preferences select the "Viewing" icon and then try the opposite mode from what you're now using) -- does that make a difference? Does switching it back stay the same?
Is this a POP or an IMAP account?
Do the unread messages in the main window indicate they are unread or read (there is a big blue dot to the left of the bold from/subject text)? I wonder what would happen if you manually marked some messages as "unread" -- does that change the count displayed? -- to try this just highlight a couple of read messages then in the Message menu item click on "Mark as unread" -- again messages that have been read do not have a big blue dot to the left of the from/subject line.
Does the Mail "Window" menu item show the correct unread count for the Inbox at the bottom of the menu list?
Try creating a filter that saves some messages to a new mailbox and then force the rule to run (need to select a range of messages before running rules with Option+Command+L -- does that mailbox show a count? First create a new mailbox called "xxx-test" the just create a rule that says that if any message has your name in it move it to the xxx-test mailbox -- don't forget to select/highlight a few messages before applying the rules -- does the xxx-test mailbox show a count?
Just some stabs in the dark to get Mail unconfused.
Good luck...