# The values given by \_count on a index is different from \_stats/docs,store

**URL:** https://discuss.elastic.co/t/the-values-given-by--count-on-a-index-is-different-from--stats-docs-store/49208
**Category:** Elasticsearch
**Created:** [May 4, 2016, 5:43pm UTC](https://discuss.elastic.co/t/the-values-given-by--count-on-a-index-is-different-from--stats-docs-store/49208 "2016-05-04T17:43:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![arjun\_r](https://avatars.discourse-cdn.com/v4/letter/a/a9adbd/32.png) [@arjun\_r](https://discuss.elastic.co/u/arjun_r)
#### Post date: [May 4, 2016, 5:43pm UTC](https://discuss.elastic.co/t/the-values-given-by--count-on-a-index-is-different-from--stats-docs-store/49208/1 "2016-05-04T17:43:27Z")

</div>

I have a cluster with 5 nodes and an index created on a daily basis. Alias pointing to all the indices for read

Ex:-  
Index 1 = foo\_2016-05-03t00:00:00-07:00  
Index 2 = foo\_2016-05-02t00:00:00-07:00

Alias foo , has both the indices

Now a GET to foo/\_count is giving us 3122518 documents ( = sum of documents in index 1 & index 2)  
However a get to localhost:9200/\_stats/docs,store yields a result of 5801911 ( from \_all.primaries.docs.count field)

Why is the difference in the values here ?

---

<div class="post-metadata">

### Author: ![thn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thn/32/8061_2.png) [@thn](https://discuss.elastic.co/u/thn)
#### Post date: [May 6, 2016, 11:16am UTC](https://discuss.elastic.co/t/the-values-given-by--count-on-a-index-is-different-from--stats-docs-store/49208/2 "2016-05-06T11:16:33Z")

</div>

I think \_count gives you the total indexed documents per index. If each indexed document has sub-document(s) then the total document count is higher than the actual number of indexed document.

For example, if you do \_cat/indices and look at the number in the docs.count column for each index. The go to each index and do \_count, some will be different. The one that is different is because each indexed document has one or more sub-document(s)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 5, 2017, 10:53pm UTC](https://discuss.elastic.co/t/the-values-given-by--count-on-a-index-is-different-from--stats-docs-store/49208/3 "2017-07-05T22:53:21Z")

</div>


