InfluxDB Docs

count() function

The count() function outputs the number of records in a column. It counts both null and non-null records.

Function type: Aggregate
Output data type: Integer

count(column: "_value")

Parameters

column

The column on which to operate. Defaults to "_value".

Data type: String

Examples

from(bucket: "example-bucket")
  |> range(start: -5m)
  |> count()
from(bucket: "example-bucket")
  |> range(start: -5m)
  |> count(column: "_value")

COUNT()