How do you get the number of CPUs?
I'm interested in dividing a task (consisting of several unconnected problems) between multiple threads so that the CPU or core count can be exploited for better performance. The FxCop code analysis tool's number of threads defaults to the number of CPUs (or cores).

