# Find count of keys with integer value type

**URL:** https://discuss.elastic.co/t/find-count-of-keys-with-integer-value-type/76995
**Category:** Kibana
**Created:** [March 1, 2017, 2:26pm UTC](https://discuss.elastic.co/t/find-count-of-keys-with-integer-value-type/76995 "2017-03-01T14:26:44Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![avivc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/avivc/32/16501_2.png) [@avivc](https://discuss.elastic.co/u/avivc)
#### Post date: [March 1, 2017, 2:26pm UTC](https://discuss.elastic.co/t/find-count-of-keys-with-integer-value-type/76995/1 "2017-03-01T14:26:44Z")

</div>

HI,  
I'm building a query in **Discover feature** and 1 of the keys owns integer data value  
I'm trying to set range of numbers values with this key so I can get the total count of records for this range

What I found so far is this:  
**E.g.** , key value goes from 0-9.

1. myKey:0 - gives me the count of records with myKey:0
2. myKey:0 + myKey:1 - gives me the count of records with myKey:0 + myKey:1

What's the syntax to own all the records?Trying to figure how to get the total count of all records from 0-9

Any idea?

---

<div class="post-metadata">

### Author: ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)
#### Post date: [March 1, 2017, 5:54pm UTC](https://discuss.elastic.co/t/find-count-of-keys-with-integer-value-type/76995/2 "2017-03-01T17:54:36Z")

</div>

Query strings can specify ranges: [https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#\_ranges](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#_ranges)

---

<div class="post-metadata">

### Author: ![avivc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/avivc/32/16501_2.png) [@avivc](https://discuss.elastic.co/u/avivc)
#### Post date: [March 1, 2017, 8:01pm UTC](https://discuss.elastic.co/t/find-count-of-keys-with-integer-value-type/76995/3 "2017-03-01T20:01:35Z")

</div>

@spalger  
Tnx Man !

---

<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: [March 29, 2017, 8:01pm UTC](https://discuss.elastic.co/t/find-count-of-keys-with-integer-value-type/76995/4 "2017-03-29T20:01:48Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
