Word count differs between iOS & macOS

The word count that the iOS app shows when I compile my manuscript is several hundred words higher than what the Mac version shows. (My total is only ~2,000 so this is a significant percentage off.)

How can I get Scrivener to agree with itself?

The most likely reason for the disagreement is that one version is including words that the other is not. Which version do you want to use to produce your final output document?

I’ll be using the Mac version to compile, and I consider it the ā€œauthoritativeā€ version when the two apps disagree.

Whether a document is part of compilation is inherent to the document itself, right? That is, if my apps are in sync, the same document with be included in both? (As opposed to each app having its own independent list of which documents to include.)

The Compile commands are completely independent between the two versions. The ā€œInclude in Compileā€ flag is assigned to the document and will transfer, but not the setting that determines what the application does with that information.

For instance, the Mac version might have a Section Layout that includes only the title of an ā€œincludedā€ document, not the body text.

Okay, cool, that matches how I thought those settings worked, thanks!

iOS reports 2,821 words when I compile.

Mac reports 2,344 words when I hover over the search area, when I view the project statistics, and also when I insert <$wc>.

The iOS app has only one compilation setting, ā€œRemove commentsā€, which is checked.

The Mac app’s ā€œCompiledā€ tab in the Project Settings window has ā€œAccurate (slower)ā€ selected, and the ā€œCompiled Statistics Optionsā€ are set like this:

Checked:

  • Count current compile group only

Unchecked:

  • Count footnotes

The Mac app also has many compilations settings, as I’m sure you know. :grinning_face_with_smiling_eyes: Here are the ones that seem most likely to be relevant:

Checked:

  • Remove comments
  • Remove annotations

Unchecked:

  • Remove footnotes
  • Delete struck-through text
  • Add front matter
  • Add back matter

My project has no annotations, footnotes, struck-through text, or back matter.

My project has a single comment right now, which is 22 words. Since both app versions are set to remove comments, and it’s not anywhere close to the mystery 477 extra words, this doesn’t seem to be the culprit.

My front matter is just the Scrivener default documents, so even if you added up the word count for all of it, it’s only 38 words (and I don’t see any front matter when I compile on either platform). Nevertheless, I tried unchecking all front matter’s ā€œInclude in compileā€ setting. As expected, that made no difference in the iOS word count.

I also tried unchecking ā€œShow titles in Scriveningsā€ in the Mac app, but (as expected) that didn’t have any effect on the iOS compilation’s word count, either.

So I’m really stumped as to where iOS is finding an extra 477 words!

As for version numbers, I’m running Mac v3.2.3 (14869) on Big Sur (11.6), and iOS v1.2.1 (2096) on 14.6 (a 1st-gen SE, not that it should matter).

If you compare the actual output files, are they the same? If you open them both in a third party editor, do you get the same count?

Getting closer! Thank you! So, you were right from the beginning that scene titles are showing up in iOS but not in Mac.

However, there’s still a couple issues I don’t understand how to work around:

  1. If I add scene titles to the Mac compile (to match iOS), the new ā€œProject Statistics > Compiledā€ word count becomes 2,946 —which is now higher than what the iOS word count reports. Even more confusing, the ā€œhover over the search areaā€ word count is still 2,344. :confused:

  2. I don’t see how to remove scene titles from the iOS compile. Is there a way to exclude titles from the iOS compile (and word count)?

  3. The iOS compile includes ā€œā–ā€ between sections, but the Mac compile does not. I’m not sure where this is coming from or if it’s possible to change/remove it, or whether it counts as a ā€œwordā€?

What settings affect the Mac word count that shows when you hover over the search area?

Maybe if I can figure out how that differs from the word count in ā€œProject Statisticsā€ for my compiled documents, that will lead me in a helpful direction…

Again, what are the actual contents of the Compiled document, and what is the count from a third party editor?

The count in the Quick Search bar is based on your progress toward the Draft Target. Options for what should be counted can be found by clicking the Options button in the Project → Show Project Targets pane. The correspondence between this value and the actual contents of your output document will depend on your Compile settings, particularly whether specific documents in the Draft folder are included, and what your Section Layout specification includes.

Likewise, you should have a look at the options in the Project → Project Statistics pane.

Section 20.1 in the manual explains the statistics tools in detail.

The suspense is killing me. Look at the compile output on ios! A difference of 477 additional words in the output will be very apparent to you and then you will know where it is coming from.

But also, is your project synced via Dropbox between the two machines, and is that sync between them actually up-to-date? (Also, you know not to have both copies open at the same time during this investigation, I hope and trust.)

tl;dr — The iOS compilation seems to inconsistently(?) include some scene titles but not others.


As I mentioned above, scene titles were showing up in iOS but not in Mac, which accounted for most of the 477-word difference.

But after I modified the Mac app’s Section Layout settings to include scene titles, the word counts became more different (ie, different parts of Mac Scrivener stopped agreeing with itself, much less iOS).

Yup, I’ve been extremely careful about this! But thanks for making sure. :slight_smile:

I used Scrivener 2 a long time ago, so I knew that I needed to be careful to never have both Mac & iOS apps open at the same time, and to make sure that Dropbox has finished syncing before opening Scrivener. I’ve been pretty paranoid about this, in fact.


Now for a deep dive…

The iOS compilation adds 56 ā– separators between scenes, which the Mac compilation does not have.

Here are my word counts today, calculated various ways:

  • 5,159: Mac hover over search area
  • 5,159: Mac project target
  • 5,159: Mac project statistics, ā€œestimate (fast)ā€
  • 5,802: Mac project statistics, ā€œaccurate (slower)ā€
  • 5,821: Mac plain text compilation, counted by third-party tool ā€œwcā€
  • 5,677: iOS compile screen
  • 5,753: iOS plain text compilation, counted by ā€œwcā€
  • 5,621: iOS compile screen - 56 ā– separators
  • 5,697: iOS plain text compilation - 56 ā– separators, counted by ā€œwcā€

So at least one mystery is solved: the Mac app’s ā€œhover over search areaā€ and ā€œproject targetā€ word counts use the ā€œestimate (fast)ā€ word count algorithm, even when the ā€œproject statisticsā€ is set to use ā€œaccurate (slower)ā€. This doesn’t seem to be configurable, but at least I understand why it’s different now.

Taking into account the ā– separators, the Mac vs iOS compilations differ by ~124 words, which ends up being due to some scene titles missing from the iOS compilation.

But!! The strange thing is, the iOS compilation includes some scene titles but not others, and I can’t identify anything unique about the ones that do vs don’t.

Here’s a subset of my project’s structure, which illustrates what I’m seeing:

šŸ“˜ Draft
ā”œā”€ā”€ šŸ“‚ PartFoo āœ…
│   ā”œā”€ā”€ šŸ“„ SceneA āœ…
│   ā”œā”€ā”€ šŸ“‚ Chapter1 āœ…
│   │   ā”œā”€ā”€ šŸ“„ SceneB āš ļø
│   │   └── šŸ“„ SceneC 🚨
│   └── šŸ“‚ Chapter2 āœ…
│       └── šŸ“„ SceneD 🚨
└── šŸ“‚ PartBar āœ…
    ā”œā”€ā”€ šŸ“„ SceneE āœ…
    └── šŸ“‚ Chapter3 āœ…
        └── šŸ“„ SceneF 🚨

Legend

  • :white_check_mark: title (and text, when it exists) appear in both Mac & iOS compilations
  • :warning: title & text in Mac, text only in iOS
  • :rotating_light: title & text in Mac, in the binder but not in iOS compilation!

Each of the problematic scenes do have the ā€œInclude in Compileā€ option checked (I checked in both Mac & iOS apps, just to be sure). All the scenes exist in the binder in iOS, but some scene titles just won’t show up in the iOS compilation.

So the remaining mystery: Why do some scene titles appear in the iOS compile, but others do not? :confused:

1 Like

This is for performance reasons. The ā€œaccurateā€ algorithm actually compiles the project, which can take quite a bit of time for large projects.

It’s too bad there’s no setting to let me choose which algorithm (perhaps because I have a powerful machine, or a small project, or I don’t care if it takes a while), but yeah, it does make sense! :+1:

The inconsistent scene titles in the iOS compilation, however, still don’t make sense. :upside_down_face:

A clue can be found in that all of the ā€œmissingā€ titles are at the same level of the outline. I admit I’ve used the iOS Compile command less than the Mac command, but I suspect the problem is that the Appearance settings on iOS don’t include Level 3 titles. (Which in fact the default does not.) For information about changing Appearance settings, see the Compiling Your Draft section of the iOS Scrivener Tutorial project.

1 Like

Huzzah! This was the last missing piece, thank you.

I had not noticed the Edit button in the screen for selecting iOS compile formats. I duplicated ā€œModernā€ and then modified it from the original:

Document Separator: "ā–"

Folder Titles:
  Level 1: <$title>
  Level 2: <$title>

Text Titles:
  Level 1: <$title>
  Level 2: <$title>

to this instead:

Document Separator: ""

Folder Titles:
  Level 1: <$title>
  Level 2: <$etc>

Text Titles:
  Level 1: <$title>
  Level 2: <$etc>

And now the scene titles all appear like I wanted! Thank you for your help & patience!

2 Likes