I believe that magic word is also for all namespaces; or at least all content namespaces. So it is not necessarily just the main namespace. the only way I can find to do it is to use the EditCount extension which is not available on UCP wikis. Therefore, if your wiki is a UCP wiki, the only way to accomplish what you want would be custom JS. If your wiki is not a UCP wiki, then it should have the EditCount extension. In that case, you can just use the transclusion-like feature of Special:EditCount.
Interesting. It isn't displaying properly here in Forum. However, it does preview properly. If you want to see what the wikitext above does, just copy-paste it onto a test page and/or preview it as a post.