code: def get_relation_count_query(self, query, parent):
          
          query.select(QueryExpression("COUNT(*)"))
  
          key = self.wrap(self.get_qualified_parent_key_name())
  
          return query.where(self.get_has_compare_key(), "=", QueryExpression(key))
docs: Add the constraints for a relationship count query.
  
          :type query: Builder
          :type parent: Builder
  
          :rtype: Builder