Remove ModuleManager::ModCount and GetCount()
Deduplicate code in modmanager_static and modmanager_dynamic
Automatically register ServiceProviders created by modules