Added test for where after count
Improved tests, added support for psql, mysql, sqlite, improved model base