When licensing SQL Server, there are a couple of minimum requirements that you need to consider.
If you are licensing by cores, then you need to be aware that 1 SQL license equals 2 cores (either physical of virtual). For example, if you are licensing 24 cores, you will need 12 licenses.
Be aware also, that core licenses are only sold in 2-packs so if you have a server with an odd number of cores, you will need to cover that one core with a full license. For example, if you have a 7 core server, then you would still need 4 licenses.
For a physical server, there is a 4 core minimum per physical processor. This means that you must purchase at minimum 2 licenses per physical processor. For a virtual server, there is also a 4 core minimum for licenses so, every virtual machine you build that is running SQL, requires at least 2 licenses.