The Mail application does not show the count of messages in a mailbox every time. At times it's frustrating. Although I couldn't find in what circumstances it does, I just gave up.
Recently I realized that one could enable the column Number in the mailboxes, and get a count quickly. I believe that people usually do not enable this column, so many may not realize it's available.
[robg adds: The message count should always be visible in the title of the window, but ... having now used the Number column for a few minutes, I like it much better. And yes, it's right there in the contextual menu when you control-click on the column headers, but I'd never really noticed it, so maybe others haven't as well.]
Mac OS X Hints
http://hints.macworld.com/article.php?story=20060713110828268