<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _add_has_where(self, has_query, relation, operator, count, boolean):
 """ 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 """

        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
        )