public function countRecords(TActiveRecord $record, $criteria) { return $this->getCommand($record)->count($criteria); }