Add a function that exposes the number of processes at mod_init(). Even
if this is not entirely accurate (some processes might remove their
external processes during mod_init), it's the best chance we can get to
count the number of pipes we need to create for modules that use
synchronous communication.