Is it possible to count words in a particular specified style?

My problem
My manuscripts for educational textbooks contain three different kinds of text, all jumbled together on the page in an apparently random manner. There are:
[] picture briefs for illustrators,
] notes for editors and layout people,
[*] and finally the actual text that students will read.

This last category is often only 30% of the whole document but it’s the only category of text which I need to count. And I really need to do so!
Each of my three text categories follows a specific style, which for ease of reading and manual counting has a different font colour. So at the minute, I keep a running tally of my student text word count by selecting each bit of that and writing it on a scrap of paper, which often as not I lose. There has to be a better way.

My query
Is it possible to count the total number of words in a particular style, regardless both of how many instances of that style a document contains, and of whether those instances are interrupted by other matter?

Or does anyone have another better way to solve my issue? Computers ought to be better at counting than me…

As always, TIA


I don’t think there’s a way to count by style.

If you’re willing to split up your documents, so that whenever the type of text changes, you start a new document, then you can isolate just the student text in certain views/searches for a quick word count. It may take a bit more work setting up your compile so that they all re-assemble seamlessly at the end, but it may prove helpful in the long-run.

You can’t do it directly in the Editor (except, as rdale suggested, at the document level), but you can configure the Compile command to exclude text of a particular style, and then get a word count of what’s left.

The option is in the Styles pane of the Compile Format editor. See Section 24.5 in the manual for more information.


There is an easier way of doing this right in the editor. It takes advantage of two separate features that work well together:

  • If you select some text in your editor, the footer bar shows statistics relative to the selection.
  • From the Styles pane, you can right-click on any style and use the “Select All Text with Paragraph Style” command.

Secondarily: the Edit ▸ Select ▸ Select All Style does the same thing, however it works off of the cursor, and means that if there is no style below the cursor then it selects all unstyled text. Given how Scrivener encourages leaving body text unstyled, this is thus a good way of selecting all text that is “body”.

The results should be self-evident. For best results, use Scrivenings mode on as much of the text as you want to have counted up by style usage. For the most efficient result, bind a custom shortcut to the Edit ▸ Select ▸ Select All Style menu command. You can then hit F4 (or whatever) at any time to get a quick tally of the desired type of text in the footer bar.

Looks like Ioa’s URL got a bit mangled. Not sure what he meant it to look like, but here’s the full link to how you can add your own keyboard shortcuts on a Mac application:

Ah ha! I’d forgotten about the Select by Style command! – Katherine

Brilliant! That’s exactly what I needed. Thank you so very much!