Number of threads is now collected at runtime. Maps id's of spawn pthreads to unique ints, which can be used as more readable id for output.