Added the code to count number of CPUs