fix count to use query

Fixes issue#3.   Verified by writing test (in lua-store-mongo).  Existing tests pass along with this one.