Count items in a list

Paste a list and get the item count. By default blank lines are skipped so the count reflects actual content. When your input has blank lines the output shows both the item count and the total line count so you know which is which.

Input
Ready
Output
Live

Count items, honestly

The tool splits on newlines and applies two toggles. Skip empty (on by default) filters out blank and whitespace-only lines before counting - the "real" item count. Turn it off to count every line including blanks. Trim (on by default) decides whether whitespace-only lines count as empty.

When your input has blank lines and Skip empty is on, the output shows both numbers: `Length: 4 items (5 lines including 1 empty)`. That way you never have to guess whether the count reflects blanks or not.

For richer list analysis (unique count, duplicate count, length stats), use List statistics. This tool is the minimal "how many items?" variant.

How to use count items in a list

  1. 1Paste your list into the input panel
  2. 2Toggle Skip empty to include or exclude blank lines (default: skip)
  3. 3Toggle Trim to control whether whitespace-only lines count as blank (default: trim)
  4. 4Output shows the count; line totals are appended when blanks were skipped
  5. 5For more stats, use List statistics

Keyboard shortcuts

Drive ListShift without touching the mouse.

Shortcut Action
Ctrl ZUndo last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor
EscExit fullscreen
Ctrl KOpen the command palette to jump to any tool
Ctrl SSave current pipeline draft Plus
Ctrl PRun a saved pipeline Plus

What this counter actually does

Two toggles, one number out.

Counts non-blank lines by default

With Skip empty on, the output number is the count of lines that have actual content. This is usually what "how many items in my list" means.

Shows blank-line totals when relevant

When your input contains blank lines that were skipped, the output includes the full line count in parentheses so you know the breakdown - e.g. `Length: 4 items (5 lines including 1 empty)`.

Trim controls what counts as "empty"

With Trim on (default), a line with only spaces or tabs counts as empty. Off, only a completely-empty line counts - whitespace-only lines count as real items.

Toggle Skip empty off for total line count

When you genuinely want to count every line regardless of content, turn Skip empty off. The output will be the raw split line count including blanks.

Runs in your browser

No server round-trip. Works offline once the page is loaded.

Worked example

Four non-blank lines, one blank. Skip empty on (default), Trim on (default).

Input
Apple
Banana

Cherry
Date
Output
Length: 4 items (5 lines including 1 empty)

Settings reference

How each toggle affects the output on the sample.

Setting What it does Effect on the sample
Skip empty: on (default) Excludes blank/whitespace-only lines from count `Length: 4 items (5 lines including 1 empty)`
Skip empty: off Counts every line including blanks `Length: 5 items (5 lines including 1 empty)` (parenthetical still shows because there was a blank in the input)
Trim: on (default) Whitespace-only lines count as empty No change on the sample (blank line is already whitespace-only)
Trim: off Only completely-empty lines count as empty If blank line had a stray space, it would now count as an item

FAQ

Why does the output show `(5 lines including 1 empty)`?
So you always know the breakdown when blanks were skipped. The primary number is the item count (non-blank lines); the parenthetical is the raw line count. When your input has no blanks, only the primary number shows.
Does the tool count characters or words, or just lines?
Just lines - one line = one item. For per-line character or word counts, use List statistics, which reports min/max/average lengths alongside the item count.
What counts as "empty" when Trim is on vs off?
Trim on: a line is empty if `line.trim()` is empty - covers blank lines and whitespace-only lines. Trim off: only completely-empty lines count as empty; ` ` (three spaces) counts as a real item.
Can I get more than just the count?
Yes, use List statistics for a full breakdown: unique count, duplicate count, average item length, longest and shortest items.
Does this tool count all lines including the header?
Every line that is not blank (with Skip empty on). If your list has a header row you want excluded, remove it first - or filter with Filter before counting.