"Quick count" from Kibana in Grafana

Hi! I want to create in Grafana topN values from elasticsearch database. Like it looks on attach.
So I have nginx access logs stored in elastic.
If I set nginx.host in grafana query, I`m getting buckets of timestamps, not values on nginx.host

How it can be done, to get nginx.host values from elastic not writing one query for each domain?