Skip to main content

Math: count

Count the number of elements in a list or an object. This is a per-record count of one incoming value's elements — for a streaming count across rows, see the Aggregate namespace counterpart.

Example
# Example for a list:
Input: [1, 2, 3, 4]
Ouput: 4

# Example for an object:
Input: { "a": 1, "b": 'Hello' }
Ouput: 2

Parameters

This function has no parameters.

Input

List or objectrequired

The list or object to count the elements from.

Output

Number
The number of elements.