Kludgey approach :(

If I wanted to fix this, I'd produce the permutations then filter them,
then count...

It'd probably be nice to do regex stuff too, to prevent some of the
iterators