Templates / Count the items returned by a node

Count the items returned by a node

Ready for 3.0

by Tom ✓ · 3,960 views · created 2023-04-17 · Engineering

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

Nodes used (3)

Customer Datastore (n8n training)

What it does

This workflow provides a simple approach to counting the items returned by a node. It uses a Set node with the Execute Once option: !image.png(fileId:704) The expression uses $input.all() (documented here) to fetch all incoming items at once, and .length (documented for example here) to count them.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.