pt: expose number of processes at mod_init
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
This fix solves event_* sync processing.
Thanks go to Rizwan Syed for reporting this, close #1768