CPU number of cores fix on linux

Since we can't rely on the "cpu cores" field of /proc/cpuinfo, we need to instead count the number of results of this command