Dynamically choose number of workers