FreeBSD - FreeBSD - CPU - Number of cores

sysctl -n hw.ncpu

returns:

24

alias nproc='sysctl -n hw.ncpu'
nproc

returns:

24

sysctl -a | egrep -i 'hw.ncpu'

or with some extra info:

sysctl -a | egrep -i 'hw.machine|hw.model|hw.ncpu'