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;
    }
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;
    }
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 ; }
Finds total number of blog entries

@return int
Finds total number of blog entries