curl -XGET 'http://www.example.com:9200/myIndexName/_count?pretty'
Output:
{ "count" : 90, "_shards" : { "total" : 6, "successful" : 6, "failed" : 0 } }
The index has 90 documents within it.
Reference Link: Here