add option to set max thread count

This pull request adds the option to specify the max. # of concurrent threads. possible values are 1->ideal.
Current value is "ideal"