I always sort of assumed the word count meant all of the text that can be visible to the player throughout all available paths, but reading this thread it would appear that both people’s expectations and authors’ conventions are all over the place.
I find that counting only the words visible in a single playthrough doesn’t really do the authors justice, especially when we’re talking about a relatively short story with immense replayability.
In the same way, I find that counting the code as well goes into the other extreme, since it might end up being double or triple of the words the player can see in total, throughout all of the paths.
Think about it, when the player reads about the number of words in a CYOA, will his first thought be how much the author worked on writing it, or how long is it going to take him to finish it? Inflating numbers like that might leave some people disappointed, since I doubt anyone except other CYOA authors would ever think that code would be included in a word count…
Counting all of the actual words( without code) from all of the paths seems like the most accurate representation of a CYOA, at least to me.
As an aside, I personally recommend writing all of your text in a program with a spellchecker (like MS Word) and then pasting it in the code. It might take you a little longer, but if you’re going to have a lot of paths and choices, it will be almost impossible to find mistakes like that just through beta testing. If you don’t use a spellchecker when you’re writing, there’s bound to be some mistakes left over in the final product, and that will ruin some people’s immersion.