Skip to main content
Participant
April 7, 2010
Question

How can I find the total word count in my entire Indesign CS3 document?

  • April 7, 2010
  • 5 replies
  • 76896 views

I have a book that consists of 10 different files and many many different text boxes. I need to find out what the total word count is for the entire book. Is there a simple way to do this, or do I have to copy and paste all the text from InD into a word file to get the number? Your help is much appreciated.

5 replies

Participant
September 3, 2025

use word instead

Participant
October 4, 2019

You can export the pages you want to count to pdf. Then open this pdf in Word. Word will the open the file and convert it. Word then shows the word count.

Participating Frequently
April 7, 2010

rdmz wrote:

I have a book that consists of 10 different files and many many different text boxes. I need to find out what the total word count is for the entire book. Is there a simple way to do this, or do I have to copy and paste all the text from InD into a word file to get the number? Your help is much appreciated.

I seem to remember that there's a script or a plug-in that can do this, but it may be limited to one file at a time. Perhaps someone on the forum has a better memory than mine. Google finds links to scripts for "indesign export story script" (without quotes), but not for whole documents.

The differences between the find/replace methods mentioned in this thread may relate to whether or not text in master-page text, and paragraph auto-numbers and bullets are counted or ignored.

There's a button in the Find dialog box to ignore master-page text like headers, footers, and page numbers. To count auto-numbers and bullets, replace them with text. NOTE: Save a copy of the document set, and perform the replacement on the copy.

HTH

Regards,

Peter

_______________________

Peter Gold

KnowHow ProServices

April 7, 2010

Hello,

You could try this regex : \S+ in all documents. But \S include punctuation.

But you can use this Loic Aigon's script, Words count : http://www.loicaigon.com/fr/auto.php?file=words_count.jsx

BobLevine
Community Expert
Community Expert
April 7, 2010

Quick way is to use find/change. Find a space, change it to a space.

ID will tell you how many changes were made. Not an exact science but it's close. Other than that, the info panel shows word count by story.

Bob

Community Expert
April 7, 2010

Find space finds about 5700 in my current document.

The change find by GREP I posted finds c.6,100 for just the alnum sequence and c.6,900 for the punctuation included.

rdmzAuthor
Participant
April 7, 2010

Okay I am going to give that a try. Thank you!


Community Expert
April 7, 2010

A find and replace is your friend

Grep Find

([[:alnum:]]+)

Change to


$1

When you hit Change All you will get a "x amount of changes made", which is total amount of words and numbers (like 2010 and 50,000 etc.)

But that won't count symbols, like punctuation or €,$,£," etc.

To do that you need something like

Find

([[:alnum:]]+)|([,.;:'@#~!"£$%^&*()-+])

Change to:

$0

Then hit change all

Alternatively you could use just

([[:alnum:]]+)|([[:punct:]]+)

Change to

$0

To find all the numbers and text and punctuation in the document

the $0 will replace any found text, found text is represented by items in parenthesis.

SebastiaoV
Known Participant
May 17, 2010

Hi Eugene, using the GREP is very interesting indeed. Thanks for you post!

Anyhow i might be using not right. Here is the situation. I made a couple of different sections of the magazine. Each section is separated from the other because i would like to have a word count of the News sections for example. Let's say News Section, 3 pages with connected text boxes. I applied

Alternatively you could use just

([[:alnum:]]+)|([[:punct:]]+)

Change to

$0

and obtained ok results. But later on for specific word counts

([[:alnum:]]+)

Change to

$1

I did gave me the whole words of the complete document. Is there anyway i could count just word (not punctuation characters) of an specific parragraph. I keep getting the whole word count of the magazine. I might applying the GREP wrongly, of course. Here is the idea.

http://www.pixentral.com/show.php?picture=16isbwm5k44gUfexJY0dJxG92GXrdH

Thanks for any info!

S

rob day
Community Expert
Community Expert
May 17, 2010

You may also try using the "Info" tab. If your whole story is linked within one text string, you can highlight all the text, click on this tab, and it will list the number of characters, words, lines and paragraphs. Similarly, if you need the word count for just one paragraph, highlight that paragraph and look at the Info Tab.


This AppleScript will get the total word counts of a folder of ID files—it shouldn't be too hard to convert to JavaScript if you are not using OSX:

tell application "Finder"

activate

set myFolder to choose folder with prompt "Select the folder containing the files to count"

set myFiles to every file of folder myFolder whose file type is "IDd5"

end tell

tell application "Adobe InDesign CS3"

set wordcounts to {}

set total to 0

repeat with j from 1 to (number of items in myFiles)

open item j of myFiles

tell active document

tell every story

set wordcounts to wordcounts & (count every word)

end tell

set totalstories to count every item of wordcounts

repeat with i from 1 to totalstories

set total to total + (item i of wordcounts)

end repeat

close

end tell

end repeat

display dialog "The documents in the selected folder have a total of " & totalstories & " stories, and " & total & " words"

end tell

========================================

If you just want the active document's count it would be:

tell application "Adobe InDesign CS3"

tell active document

set wordcounts to {}

tell every story

set wordcounts to wordcounts & (count every word)

end tell

set total to 0

set totalstories to count every item of wordcounts

repeat with i from 1 to totalstories

set total to total + (item i of wordcounts)

end repeat

display dialog "Total words in all " & totalstories & " stories: " & total

end tell

end tell