title: Elasticsearch. Get count of values in a field of specific index
body: <p>Tried to find any method to retrieve count on values in a specific field. But so far I did not find appropriate method in Elastic API documentation.</p>
  
  <p><a href="https://i.stack.imgur.com/8zNW7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8zNW7.png" alt="enter image description here"></a></p>
  
  <p>Let's consider I have this basic piece of code:</p>
  
  <pre><code>var elasticsearch = require('elasticsearch');
  var client = new elasticsearch.Client({
    host: 'localhost:9200',
    log: 'trace'
  });
  </code></pre>
  
  <p>I need to get count from index "persons", field "dri"</p>