Maybe the OP was just an example regarding the filter speed and no real-life application, but
[all[shadows+tiddlers]is[tiddler]count[]]
and
[all[tiddlers]count[]]
give me the same number, even with an overridden shadow in the wiki, as I would expect.
So why not just use
[all[tiddlers]tag[foo]]
Am I missing something?
Have a nice day
Yaisog