So, I was having issues with Smart Mailboxes not updating properly and not showing the unread count after upgrading to Yosemite and the 10.10.1 update which I was expecting to be an official fix!
As it the 10.10.1 update had no effect, I looked around these forums and found a thread related to Mavericks Mail describing the same issue.
smart mailbox unread counts wrong
The post from JAG66 and the one 2 posts before by Roger.Cavanagh seem to have fixed the issue. I did the Spotlight re-index first and waited for it to finish (check the processes in Activity Monitor - _spotlight user processes should drop down to 0 or a few%)
The second operation that I think ultimately fixed the issues was the DB cleanup described in JAG66's post.
I need to leave Mail running for a bit to be 100% sure its fixed as the Smart Mailboxes are normally up to date when starting Mail. So far though, new emails have shown up in the smart mailbox and the unread count is correct.
Hope this helps someone...
Cheers
Mr A