Define number of worker threads based on cpu count