Count Rows / Items in Data Set
Count the rows and columns of a pasted data file, with an optional header row.
What this page computes
Paste a data file and the page reports how many lines it holds and how many fields the first line splits into. The delimiter is detected from the first line or chosen from the list, and a header row is counted separately when you say the first row is one.
Where it stops
The count removes one trailing newline, so a file that ends in a line break does not gain a phantom row. Blank lines in the middle are counted because a spreadsheet would show them; a box with no text is refused instead of reporting zero rows.
Why the answer repeats
The lines are split in this tab with JavaScript, so the figure for a given paste never changes and no part of the file is uploaded or stored.
Row and column count for a pasted data file: lines are rows, fields in the first row are columns, and the delimiter is detected or chosen. One trailing newline is ignored; a header row is reported on its own and an empty box is refused.
How to use it
Paste the file and press Run. Choose how the first row should be read and, if the detection is wrong, name the delimiter yourself.
The arithmetic
Rows are line breaks after one trailing newline is removed. Columns are the fields of the first line, so a ragged file reports the width of that line and not the widest row.
What to Expect
Best for
- sizing an import before writing it
- spotting a ragged CSV
What this tool keeps
- the row total, the data-row count and the column count
Sample input
a,b / 1,2 / 3,4 with a header
Sample output
Rows = 3 (2 data row(s) + 1 header) Columns = 2 (from the first row)
Frequently asked questions
How do I use the count rows data set page?
Paste the data, pick a delimiter or leave it on auto, say whether the first row is a header, then press Run.
Is anything uploaded?
No. The whole calculation runs in this tab with JavaScript: no request is made, no account is needed, nothing is stored, and the page keeps working offline once it has loaded.
What are its limits or bounds?
The box must hold at least one non-blank line. The trailing newline is removed so it is not counted; blank lines inside the file must stay because they are rows.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.