code: public function getTotalItems()
      {
          if (is_null($this->_totalItems)) {
              $this->_totalItems = $this->dataProvider->totalItemCount;
          }
  
          return $this->_totalItems;
      }
docs: Get total items.
  
  @return [[@doctodo return_type:getTotalItems]] [[@doctodo return_description:getTotalItems]]