Detecting the number of CPU cores in R.