original_string: public function count_entries() {
          global $DB;
          if ($this->totalentries === null) {
              if ($sqlarray = $this->get_entry_fetch_sql(true)) {
                  $this->totalentries = $DB->count_records_sql($sqlarray['sql'], $sqlarray['params']);
              } else {
                  $this->totalentries = 0;
              }
          }
          return $this->totalentries;
      }
code: public function count_entries() {
          global $DB;
          if ($this->totalentries === null) {
              if ($sqlarray = $this->get_entry_fetch_sql(true)) {
                  $this->totalentries = $DB->count_records_sql($sqlarray['sql'], $sqlarray['params']);
              } else {
                  $this->totalentries = 0;
              }
          }
          return $this->totalentries;
      }
code_tokens: public function count_entries ( ) { global $ DB ; if ( $ this -> totalentries === null ) { if ( $ sqlarray = $ this -> get_entry_fetch_sql ( true ) ) { $ this -> totalentries = $ DB -> count_records_sql ( $ sqlarray [ 'sql' ] , $ sqlarray [ 'params' ] ) ; } else { $ this -> totalentries = 0 ; } } return $ this -> totalentries ; }
docstring: Finds total number of blog entries
  
  @return int
docstring_tokens: Finds total number of blog entries