# Count number of measurements of a bucket

**URL:** <https://community.influxdata.com/t/count-number-of-measurements-of-a-bucket/34360>\
**Category:** Dashboards\
**Created:** [May 25, 2024, 3:42pm UTC](https://community.influxdata.com/t/count-number-of-measurements-of-a-bucket/34360 "2024-05-25T15:42:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnonymousWebHacker](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anonymouswebhacker/32/15687_2.png) [@AnonymousWebHacker](https://community.influxdata.com/u/AnonymousWebHacker)\
**Post date:** [May 25, 2024, 3:42pm UTC](https://community.influxdata.com/t/count-number-of-measurements-of-a-bucket/34360/1 "2024-05-25T15:42:40Z")

</div>

I was searching all the documentation (forgive me if I didn’t find it) and I couldn’t find a way to make a request to the database, and it would return, for example, the number of measurements that a bucket has.

Found a related question

> [@Get the total number measurements and display the number of rows](https://community.influxdata.com/t/get-the-total-number-measurements-and-display-the-number-of-rows/2107):
>
> Hello i’m new to Influx and i used relational databases in the past a lot. I could not find a way to get the total number of measurements in a database. I found out show measurements… but unfortunately no total numbers… And related question, in relational databases, when you perform a query from their native CLI, i can get the total number which is quite useful…is there anything similar with Influxdb (some configuration parameter?) thanks

```auto
influx -database telegraf -execute "show series" | tail -n +3 | awk -F, '{print $1}' | uniq | wc -l

```

Which gives a solution from flux cli (terminal) which is good information, but generally I want to ask influxdb directly for this information

---

<div class="post-metadata">

**Author:** ![scott](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/scott/32/16492_2.png) [@scott](https://community.influxdata.com/u/scott)\
**Post date:** [May 28, 2024, 4:38pm UTC](https://community.influxdata.com/t/count-number-of-measurements-of-a-bucket/34360/2 "2024-05-28T16:38:30Z")

</div>

@AnonymousWebHacker What version of InfluxDB are you using?

---

<div class="post-metadata">

**Author:** ![ebabeshko](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/ebabeshko/32/14844_2.png) [@ebabeshko](https://community.influxdata.com/u/ebabeshko)\
**Post date:** [June 16, 2024, 3:50pm UTC](https://community.influxdata.com/t/count-number-of-measurements-of-a-bucket/34360/3 "2024-06-16T15:50:20Z")

</div>

> [@AnonymousWebHacker](#):
>
> make a request to the database, and it would return, for example, the number of measurements that a bucket has

For InfluxDB 2 and flux that’s pretty easy to do:

```auto
import "influxdata/influxdb/schema"

schema.measurements(bucket: "example-bucket")
|> count()

```
