Fix the count() impl to use buildWhere() from the subclass