Count buckets in aggregation?

i'm trying to find duplicates by field. For this case i create terms agg. but also i want to know the count of duplicates, not field cardinality, but only amount of duplicated values. Can i return number of buckets somehow?

1 Like