I pasted a product list with blank lines in it; how do I find out how many products it really has?

Read 'Non-empty lines' in the word counter, not 'Lines'. Blank lines are included in the line count, while non-empty lines count only lines with visible text, which is your number of products when each product sits on its own line. A line break at the very end of the list does not open a new line, so it never adds a phantom item.

Published · 3 min read

Example: four products, six lines

Here is a list copied from a supplier chat, the way it usually arrives, with stray blank lines and a line break at the end: Arabic coffee, a blank line, green tea, Sukkari dates, a blank line, cardamom. We pasted the Arabic original into the Word and character counter:

  • Lines: 6, because the two blank lines count.
  • Non-empty lines: 4, the real number of products.
  • Words: 7, because three of the products have two-word names.
  • Paragraphs: 3, because the blank lines split the list into three groups.

The word count is no use for counting products, since «قهوة عربية» (Arabic coffee) is two words and one product. The paragraph count measures groups, not items. The only figure that fits here is non-empty lines.

What about the last line?

Many lists copied from spreadsheets or files end with a line break after the last item. If the counter treated that as a new empty line, you would see 7 lines instead of 6. The tool ignores a single final line break at the end of the text, so the same list gives 6 lines with or without it. A line holding only spaces counts as empty too, so it never joins the non-empty lines.

Steps for a list from a supplier or customer

  1. Copy the list exactly as it is from the chat or file and paste it into the counter.
  2. Read 'Non-empty lines'. That is the number of items when each item has its own line.
  3. If you expected a different number, look for a line with two items separated by a comma, or an item split across two lines.
  4. If the list has repeats, such as a product ordered twice, the counter counts it twice. Remove duplicates first with the Duplicate-line remover, then paste the result back into the counter to get the number of different products.

When this number does not fit

If the list has section headings, such as 'Drinks:' above a group of products, the heading is a non-empty line and will be counted. If a product is written with its quantity on one line and a note on the next, the note is a line too. In those cases check the list by eye, or delete headings and notes before counting. The counter counts lines exactly, but it cannot tell which line is a product and which is a comment.

Common questions

Are lines that wrap in the text box counted?

No. A long line that wraps on screen is still one line, because counting relies on real line breaks.

The list came from a Windows file. Do the numbers change?

Not the line count. The text box converts line endings to one kind when you paste, and the tool recognises all three kinds anyway.