I know the curl command to get the information I need.
curl localhost:9200/_cat/indices/alerts*
and the output is
yellow open alerts_1502744517_1 5 1 25 0 642.3kb 642.3kb
yellow open alerts_1502744517_0 5 1 25 0 741.8kb 741.8kb
yellow open alerts_1502744882_0 5 1 27 0 679.8kb 679.8kb
What I need is the index name and the document count, which in this case is the 6th column (the 25, 25, and 27). How do I make the equivalent call using the java API?