original_string: protected function getQueryResultCount(Select $query)
      {
          $queryString = $this->getSqlObject()->getSqlStringForSqlObject($query, $this->dbAdapter->getPlatform());
  
          $format = 'Select count(*) as `count` from (%s) as `query_count`';
  
          $countQueryString = sprintf($format, $queryString);
  
          $countQuery = $this->dbAdapter->query($countQueryString);
  
          $result = $countQuery->execute()->current();
  
          return (int) Arr::get($result, 'count');
      }
code: protected function getQueryResultCount(Select $query)
      {
          $queryString = $this->getSqlObject()->getSqlStringForSqlObject($query, $this->dbAdapter->getPlatform());
  
          $format = 'Select count(*) as `count` from (%s) as `query_count`';
  
          $countQueryString = sprintf($format, $queryString);
  
          $countQuery = $this->dbAdapter->query($countQueryString);
  
          $result = $countQuery->execute()->current();
  
          return (int) Arr::get($result, 'count');
      }
code_tokens: protected function getQueryResultCount ( Select $ query ) { $ queryString = $ this -> getSqlObject ( ) -> getSqlStringForSqlObject ( $ query , $ this -> dbAdapter -> getPlatform ( ) ) ; $ format = 'Select count(*) as `count` from (%s) as `query_count`' ; $ countQueryString = sprintf ( $ format , $ queryString ) ; $ countQuery = $ this -> dbAdapter -> query ( $ countQueryString ) ; $ result = $ countQuery -> execute ( ) -> current ( ) ; return ( int ) Arr :: get ( $ result , 'count' ) ; }
docstring: Get the count of results from a given query
  
  @param  Select $query
  @return int
docstring_tokens: Get the count of results from a given query