There are many commands can be used to get the CPU information on linux box. You can use any of below command to get the cpu count on linux box.
$ cat /proc/cpuinfo | grep processor | wc -l
$ lscpu l
$ cat /proc/cpuinfo | grep processor | wc -l
$ lscpu l