Set number of thread for execution