code: def _add_has_where(self, has_query, relation, operator, count, boolean):
          
          self._merge_model_defined_relation_wheres_to_has_query(has_query, relation)
  
          if isinstance(count, basestring) and count.isdigit():
              count = QueryExpression(count)
  
          return self.where(
              QueryExpression("(%s)" % has_query.to_sql()), operator, count, boolean
          )
docs: Add the "has" condition where clause to the query.
  
          :param has_query: The has query
          :type has_query: Builder
  
          :param relation: The relation to count
          :type relation: orator.orm.relations.Relation
  
          :param operator: The operator
          :type operator: str
  
          :param count: The count
          :type count: int
  
          :param boolean: The boolean value
          :type boolean: str
  
          :rtype: Builder