original_string: protected function getCount(Relation $relation)
      {
          if ( ! $relation) return 0;
  
          $query = $this->modifyRelationQueryForContext($relation->getRelated(), $relation->getQuery());
  
          return $query->count();
      }
code: protected function getCount(Relation $relation)
      {
          if ( ! $relation) return 0;
  
          $query = $this->modifyRelationQueryForContext($relation->getRelated(), $relation->getQuery());
  
          return $query->count();
      }
code_tokens: protected function getCount ( Relation $ relation ) { if ( ! $ relation ) return 0 ; $ query = $ this -> modifyRelationQueryForContext ( $ relation -> getRelated ( ) , $ relation -> getQuery ( ) ) ; return $ query -> count ( ) ; }
docstring: Returns the count for a given relation.
  
  @param Relation $relation
  @return int
docstring_tokens: Returns the count for a given relation .