[[esql-agg-count]] === `COUNT` Counts field values. [source.merge.styled,esql] ---- include::{esql-specs}/stats.csv-spec[tag=count] ---- [%header.monospaced.styled,format=dsv,separator=|] |=== include::{esql-specs}/stats.csv-spec[tag=count-result] |=== Can take any field type as input and the result is always a `long` not matter the input type. NOTE: There isn't yet a `COUNT(*)`. Please count a single valued field if you need a count of rows.