plugins: capture total module count
...in a global variable, alongside the plugin list and such.
this allows us to improve the efficiency of all module_list_get()
calls
since we know ahead of time what the total size of the array needs to be.
additionally, the module_LoadPlugins()
function was making a wildly
inefficient call to that function, relatively speaking, just to be able to
print the count in a debug message. this can also use this count directly
to avoid the unnecessary work.