override count method in mysql to make the where clause parsing consistent with 'all' method