Change how number of worker threads is calculated