Number of cpus and cores in macbook pro?

On Macbook Pro, I clicked "about this mac", and it shows that

Number of Processors: 1
Total Number of Cores: 2

I thought I have more cores and cpus, because when I created a virtual machine in Virtualbox, it allows me to specify up to 4 cpus to the virtual machine.

So how can I find out the number of cpus and cores on this laptop?

lshw doesn't work in bash under Mac. Is there some similar command?

Thanks.


The simplest way is to launch Activity Monitor - in Applications/Utilities

Then hit Cmd ⌘ 3 which will open the CPU History.
Then you just count the stripes ;-)
It counts virtual cores, so includes HT [Hyper-threading] cores.