I have 4 physical hosts with 10 VMs each. How many licenses do I need?

The number of virtual machines does not matter for licensing. Each installation needs a license.

In the case of Hyper-V you would typically install BackupChain on the host, either the Server Edition , the Server Enterprise Edition, or the Server Enterprise Edition with Premium Support.

If you are using Hyper-V on Windows 8 instead of a Windows Server 2008 or later, you can back up Windows 8 Hyper-V with a Professional Edition, provided that you do not use Hyper-V checkpoints / snapshots.

For four hosts you hence need just four licenses.