Counts the number of CPUs by using several method