Stop flagged messages in inactive accounts from contributing to Flagged counter
You've found a bug with Mail. I've just confirmed it fails for me as well. The count reflects the sum total of flags - and doesn't get filtered down when you disable an account that contributes to the total flag count.

I'll send a bug report to Apple and anyone else that cares can as well:

http://bugreporter.apple.com