/**
  * Analog of mysql_num_rows()
  *
  * @return int $number
  */
 public function countRecords()
 {
     if ($this->is_result_cached) {
         return count($this->result);
     } else {
         return parent::countRecords();
     }
 }