I know this is an arbitrary metric, but if we count all books or stories officially published as part of an SFF universe, (even one with multiple authors and/or subseries), which would result in the largest combined word count?
Star Wars - 129(ish) million
This includes 79 million in adult novels and novelisations (split into 70 million in Legends / 9 million in Canon) plus 50 million from in-universe factbooks. Taking into account about three hundred or so missing 'junior readers' (which I've estimated to have around 500 words each) and just over 2500 comics published (which I've estimated to have about 200 words each), that brings us to a rough total of around 129 million words written in-universe. Note that there are also at least 20-30 million words written out-of-universe (e.g. guides, encyclopedias, etc)
Other fictional universes that are decent contenders include;
Star Trek - 18.5 million
This includes 17.3 million words of fiction, 500,000 words of in-universe factbooks and more than a thousand comics, counted in the same way as above.
Xanth - 4.2 million
Discworld - 3.8 million
Dune - 3 million
The Culture - 1.8 million
Babylon 5 - 1.2 million
My libraries for the 'universes' above are reasonably comprehensive.
I've used a simple word counting tool on them to estimate the count for each book, then totalised them. I've subtracted 2% for the legalese found at the start of each novel. Note that these scores are going to be inaccurate (although hopefully not wildly inaccurate) for a host of reasons including accidental dupes, missing books, book promos, etc.
Perry Rhodan - 93 million (approximately)
Here is a press release regarding the 60 year anniversary of the German weekly pulp series Perry Rhodan: https://perry-rhodan.net/presse/zahlen-zum-gr%C3%B6%C3%9Ften-roman-kosmos-der-welt-einige-fakten-rings-um-60-jahre-perry-rhodan
They do not have a word count (which probably does not make sense in any case, since word lengths differ per language), but they estimate the character count for Perry Rhodan proper (the 3100 issues without paperbacks and spinoffs) at 558 million characters (however that seems to include whitespace).
The "Duden", the most used reference when it comes to German spelling and grammar, gives the average word length their own dictionary as about 6 letters if you includes articles (i.e. if they include explanatory text in the calculation of their word count) or some 14,5 if they count only the vocabulary itself. Perry Rhodan certainly uses a lot of articles and pronouns, so the first definition seems more pertinent. 558 million characters divided by six is 93 million words, which is impressive, but not notably more so than the Star Wars word count mentioned in the comments to the question. But there is more.
Their paperback series "PERRY RHODAN-Planetenromane" has an additional 400 issues (no character count given, IIRC they have about 150 pages, so about twice a regular issue).
They have also published paperbacks that are not part of the "Planetenromane". No exact number given.
They had a few spin-offs, most notably probably the Atlan series with some 850 60 page issues.
They mention that "The World of Perry Rhodan" so far has some 5000 "novels" ("Romane", their term for every publication that has at least the length of a regular issue, but might be longer - that includes everything above, i.e. weekly issues, paperbacks, special editions etc). I am not sure if the Perry Rhodan Neo series (a re-retelling of the original stories in a modernized form) is included (it is not mentioned by name in the press release, that would be some 300 issues).
They also have anthology editions that collect weekly issues in hardback format. Since at least the early issues have been heavily edited and condensed, you might count them as original content (but the press release does not).
So certainly a contender.
It may not be as large as Star Wars but the Warhammer Universe comprises somewhat over 67 Mwords by my estimation. This is not as many as I expected, frankly, but I have tried to be conservative in my estimate, since I have no way to derive an exact count.
The details of my analysis follow.
The Warhammer Universe comprises Warhammer, Warhammer 40k, some smaller series, like Blood Bowl and Necromunda, plus the pan-universe periodicals Inferno and Hammer and Bolter. A count of the linked ISFDb page yields:
- 584 novels
- 163 anthologies and collections
- 249 omnibuses
- 1241 short works (up to novella length)
- 19 "non-fiction" works (e.g. art books)
- 72 periodical issues
In making my estimation I have included only the novels, anthologies, collections and periodicals. It is too difficult to estimate the word-count of the short works, since ISFDb only provides page-counts for publications as a whole, and the assumption is that most of the short works will appear in an anthology or collection. (see below) Likewise the assumption is that an omnibus will contain works already published as a novel or as a short work in a collection. The non-fiction we ignore since it is relatively insignificant anyway.
Since ISFDb only provides page counts we need to derive a word count from that somehow. Fortunately, this reddit post provide a total word-count of 5 383 300 for the first 47 Horus Heresy books, and ISFDb gives us a total page-count of 21 438 pages for the paperback versions of these. (5 383 300 / 21 438) = 251.11 words/page. (Which is close enough to the standard estimate of 250 words/page for a paperback to be worth a facepalm.)
Now we need to estimate the page count; I'm not going to visit all 747 books to add up the total pages in all the novels and collections. I did, however sum up the 85900 pages of the Warhammer universe, which divided by 245 books yields approximately 350 pages per book. The periodicals having 66 pages each, we get 747 * 350 + 72 * 66 = 266 202 pages, at 250 words/page is 66.55 million words. (It is not practical to continue anyway, since very shortly into the Warhammer 40k books we start encountering e-book-only anthologies which do not provide page-counts.)
Previously I made the assumption that all short fiction appeared in an anthology or collection, but that is not the case; sampling short fiction published since 2010, a great deal, close to half, is published only as stand-alone e-books or in e-book omnibuses. Thus rounding up to 67 million words is likely a very conservative estimate of the number of words in the Warhammer Universe.
Extending Valorum's excellent answer, I'd put anything by David Weber above the word counts for Babylon 5 and The Culture, and probably Dune too.
Worse, they're almost all entirely written by a single author ...
- Safehold series - 10 books, 2.75 million words
- Honor Harrington - 14 books in the main series, 22 additional books listed. My collection is by no means complete, and comes to 7.5 million words
Are we including Fantasy?
- Robert Jordan's The Wheel of Time: approximately 4.9 million words
To make it a bit less English-centric, I nominate 'La Compagnie des Glaces'. 97 novels, 200-ish pages each, totaling about 6 million words.
Doctor Who books. Hundreds and hundreds of the things.