protected function getCount(Relation $relation)
    {
        if ( ! $relation) return 0;

        $query = $this->modifyRelationQueryForContext($relation->getRelated(), $relation->getQuery());

        return $query->count();
    }