Limit number of dot threads

Based on the comment regarding flexibility:  a user should be able to set the number of threads to a higher value than the number of CPUs if that makes sense for his system.
In case of a non-negative number get the old behavior (with the exception of the limitation to 32 processes)
With a negative number limit the number of processes based on the number of available processors.