improve count support

overrides .count method and make it accept the same 'where' clauses accepted in method .all