If someone wants to jump deeper into this:
What about some kind of script that counts how many times a page is listed in Special:AllPages in namespace 1 (talk) would work here. Assuming message walls are enabled, every comment will be listed as a special @comment 'sub' to the mainspace pages.
Read all lines from Special:AllPages?namespace=1 and split the string at /
If your wiki has a large amount of pages you have to keep in mind Special:AllPages will split the page and you will have to read multiple separate pages.