Hiya!
Let's seee...
1- The wordcount counts all the written (not-code) words for the story. So If I were to copy what's in the source file and remove the code, and paste it on a word counter, I'd get max 500 words.
For the string, we would count it as 10.
2- If only the number changes, just the string as is :) (so 8 words in your example)
3- How many times are you using that generator?