// This file is autogenerated, DO NOT EDIT
// aggregations/metrics/valuecount-aggregation.asciidoc:15

[source, python]
----
resp = client.search(
    index="sales",
    size="0",
    aggs={
        "types_count": {
            "value_count": {
                "field": "type"
            }
        }
    },
)
print(resp)
----
