Added tests, restructured testing suite, fixed Count()
Removing count distinct for now, as it doesn't work for sqlite or mysql