add new option -ncpu to root-config.

--ncpu reports the number of (hyperhtreaded) cores in a machine independent way.
use root-config --ncpu.