I have the badge set to show the number of starred items. I just noticed that it includes starred items that aren't displayed due to filters. This is counter intuitive... I chose to hide these items from view (mostly future tasks) so it seems logical to not want to include these in the count. I don't know if filtered tasks are filtered when the badge is set to show the number of tasks with some other quality, but the same thing would apply.
I hope you will agree with me. It would be a shame to turn off the badge as not accurate for this reason.
I use Starred task for my "Today" list on GTD. I hate looking at my badge and not knowing how many task I really have to do that day until I open Toodledo.
Sometimes it says 10 when there is really only 4. I use the Start Date option for some task that I want to become active on a particular day and automatically have the Star selected so they show up on my "Today" list. This is where I am getting all of the extra task showing on the badge and I hate it.