original_string: public function count_repeats() {
          global $DB;
          if (!empty($this->properties->repeatid)) {
              $this->properties->eventrepeats = $DB->count_records('event',
                  array('repeatid' => $this->properties->repeatid));
              // We don't want to count ourselves.
              $this->properties->eventrepeats--;
          }
          return $this->properties->eventrepeats;
      }
code: public function count_repeats() {
          global $DB;
          if (!empty($this->properties->repeatid)) {
              $this->properties->eventrepeats = $DB->count_records('event',
                  array('repeatid' => $this->properties->repeatid));
              // We don't want to count ourselves.
              $this->properties->eventrepeats--;
          }
          return $this->properties->eventrepeats;
      }
code_tokens: public function count_repeats ( ) { global $ DB ; if ( ! empty ( $ this -> properties -> repeatid ) ) { $ this -> properties -> eventrepeats = $ DB -> count_records ( 'event' , array ( 'repeatid' => $ this -> properties -> repeatid ) ) ; // We don't want to count ourselves. $ this -> properties -> eventrepeats -- ; } return $ this -> properties -> eventrepeats ; }
docstring: Return the number of repeat events there are in this events series.
  
  @return int number of event repeated
docstring_tokens: Return the number of repeat events there are in this events series .