adjust threads based on number of targets