Change number of threads