Limit thread count between 1 and 8