Obtaining the word count of all the possible text that the player can see is not really generally possible, using Inform 7 code or not, for reasons well explained by Michael Hilborn in this blog post:
"Unfortunately, word counts in IF are relatively meaningless, especially since the process of defining what is meant by ‘word count’ in IF is nebulous at best. When Inform 7, an IF-authoring tool, explains that it has generated a story of 20,000 words, it refers not only to the prose presented the player, but also to the game’s code—a glorious amount of text that is generally never experienced by anyone but the author. If we are to ignore code in the word count, which is often suggested, then perhaps we can only count the words encountered by the player. Even this is problematic, for a majority of this prose may consist of standard responses, not author-generated content; or, perhaps, the author has written only a few lines of text, but through the trickery of randomness and some clever use of code, the game erupts with an infinite supply of unique prose."
Nevertheless, some approximations are possible, but these are for your own purposes and aren't calculated by the game code proper. The two I could think of are:
Finding out how many words in your code is within quotation marks within the Inform 7 IDE, with help from outside (say, some regular expression tricks). This will include "[one of]" and if statements within text, and it will return only 4 words in the case of "[list of visited rooms]". The Inform 7 IDE does not have the ability to calculate this itself unlike the general word count.
Finding the word count after the end of a specific session. This is easy with transcript copy-pasting into a word processor that has word count, although you may need to make a few adjustments.
All in all, though, the answer to whether Inform 7 has a good way to calculate the prose word count is that it doesn't due to the inherent complexities and exceptions that arise.