Add the /_cat/count and /_cat/count/{index} API.

The cat count API allows retrieving the count of all docs in the
cluster, or docs in specific indices, in a human-readable format.