fix queries with empty where, which result in generating sql with WHERE 1=1

I'm not sure how to actually test this one, since we don't return any means for checking generated SQL, however, if you do a list with no criteria the resulting .count called will try to query with an empty queryset for the "where" key and the output will look like:

```
SELECT COUNT(*) as `count` FROM `users` WHERE 1=1;
```