Ramirez,
I understand your question as difference between 1. logical vs virtual CPUs / per hosts, and 2. cluster/host max. VM count.
Consider the case given below;
2 ESXi hosts - 20 VMs
ESXi 1 -- 4 Sockets, 2 cores/ socket
ESXi 2 -- 8 Sockets, 2 cores/ socket
Now here logical CPU count -- (4x2) + (8x2) = 24
20 VMs -- 2 sockets, 2 core / socket
Virtual CPU count -- 20x (2*2) = 80
Hope your first confusion is clear now.
And one more complex thing from maximums:
Virtual machines per host: 512
Hosts per cluster: 32
Therefore, in the cluster can exist Virtual Machines (in maximum): 521 * 32 = 16384
But in document we have only 4000 VMs in maximum.
Why?
It means even though you have 32 hosts and each host can accommodate 512 VMs each the maximum number of VMs per cluster should not exceed 4000. And it doesn't imply that you can have a maximum of (512*32) VMs.
~dGeorgey