Word Counter Max for Google Docs is a totally free add-on that I wrote to display the live word count of the current document even for lengthy documents of 5000 words or more. Unlike the default word counter, you will be able to set exclusions to ignore certain text and you can generate detailed reports for your document. There's more, whether you need to hit a minimum word count or reduce your word count to be within the limit for your assignment, you can set targets for that. This word counter should be relatively accurate though there may be slight discrepancies since every word counter considers what should be a word differently. Do write in if there are major errors or bugs.
Available exclusions in V6.2
Generate word report
Install this add-on from the Google Workspace Marketplace
2. Open the word counter sidebar by choosing "Add-ons > Word Counter Max for Google Docs > View". Then configure the add-on to customise it.