Add a wrapper to fetch the number of CPUs in the system.
Fetch the numbre of CPUs and use this when doing CPU affinity.