Count
Last updated
Last updated
Calculates the number of items in an array. It simply returns the length of the input array, regardless of what type of items the array contains.
value
The array to count items in
List
Yes
value
The number of items in the array
Number
Drag the Count node into your graph.
Connect an array (like [4, 5, 6, 7]
) to the "value" input.
Run the graph—with the example array, your output will be 4.
Works with any type of array (numbers, strings, colors, mixed types, etc.).
Empty arrays will return 0.
This node counts only the top-level items; it doesn't count items in nested arrays.
Validation: Check if an array has any items or has a specific number of items.
Dynamic Layouts: Adjust layouts based on the number of items to display.
Data Analysis: Count the number of data points, colors, or other collection items.
Loop Control: Use the count to determine how many iterations to perform.
: Alternative way to get the length of an array.
: For counting only items that match specific criteria.
: For locating specific items in an array.