I've had some odd behavior on my OS X mail client. Heres' my inbox:
Yet here is how many unread messages I have:
These values used to be synchronized. Note that the first value will not change even if I mark all other messages as read (subfolders included).
OS X 10.7.4
Mail = Version 5.2 (1278)