A lot of licensing is based on the number of CPU sockets and or cores assigned to a system. See below for methods on making the proper determination
wmic cpu get NumberOfCores, NumberOfLogicalProcessors/Format:List
and here's another method which outputs in a tabular format.
wmic CPU list brief
gwmi win32_processor | select DeviceID, NumberOfCores, NumberOfLogicalProcessors
To get a total CPU count in most licensing you need the number of sockets and the number of cores. Consider the powershell output below;
DeviceID NumberOfCores NumberOfLogicalProcessors
-------- ------------- -------------------------
CPU0 4 4
CPU1 4 4
Each row represents a socket or if you prefer, a CPU. The number of cores is the number of physical cores in the CPU. This is the number of instructions the CPU can run simultaneously. The number of logical processors is the number of cores multiplied by the number of threads each core can run...this is commonly known as hyperthreading.
So to determine the total number of cores on a given server, simply add up the. If hyperthreading is applicable in you case, add up the number of logical processors instead.
Alternately you can take the number of CPU's and multiply by the number of cores in a single CPU. I prefer the addition method, it seems more straight forward and accounts for those rare, and I mean really rare instances where CPUs may actually vary on the number of cores or core capabilities.