A family of Microsoft word processing software products for creating web, email, and print documents.
You would need to combine the first macro in https://wordmvp.com/FAQs/MacrosVBA/GetNoOfReplacements.htm with the macro in https://wordmvp.com/FAQs/Customization/ReplaceAnywhere.htm. (If you don't care about the other "stories" in the document, such as headers and footers, the latter macro can be restricted to the stories wdMainTextStory, wdFootnotesStory, and wdTextFrameStory.)
If you aren't familiar with the macro language (VBA), post in the Office programming section of the forum, https://answers.microsoft.com/en-us/msoffice/forum/msoffice_word-msoffice_custom, and explain exactly what you need to do. You can link back to this thread.