def METHOD_NAME(domain):
    agg = aggregations.TermsAggregation('doc_type', 'doc_type').aggregation(
        aggregations.TermsAggregation('base_doc', 'base_doc')
    )
    doc_type_buckets = (
        es.UserES()
        .remove_default_filters()
        .filter(es.users.domain(domain))
        .aggregation(agg)
        .size(0)
        .run()
        .aggregations.doc_type.buckets_dict
    )
    counts = Counter()
    for doc_type, bucket in doc_type_buckets.items():
        for base_doc, count in bucket.base_doc.counts_by_bucket().items():
            deleted = base_doc.endswith('deleted')
            if deleted:
                doc_type += '-Deleted'
            counts[doc_type] = count
    return counts