From 3dcd9ea3c755bb6f6c87fe83043a824fd12b2dcf Mon Sep 17 00:00:00 2001 From: Michael Bianco Date: Thu, 15 Feb 2024 13:31:45 -0700 Subject: [PATCH] docs: count inputs vs elements of input (#5035) --- docs/language/aggregates/count.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/language/aggregates/count.md b/docs/language/aggregates/count.md index c4ffeb08e0..0d79e50e87 100644 --- a/docs/language/aggregates/count.md +++ b/docs/language/aggregates/count.md @@ -42,3 +42,12 @@ echo '1 "foo" 10.0.0.1' | zq -z 'yield count()' - 2(uint64) 3(uint64) ``` + +Note that the number of input values are counted, unlike the [`len` function](../functions/len.md) which counts the number of elements in a given value: +```mdtest-command +echo '[1,2,3]' | zq -z 'count()' - +``` +=> +```mdtest-output +1(uint64) +```