Query fixes.

I discovered that the "$unwind" operation doesn't quite do what I
thought it did.  Replacing it with a more straightforward approach gave
the correct numbers.