Microsoft has a useful page that responds to a number of common questions about licensing Exchange. It includes, for example, licensing implications associated to Enterprise Client Access Licenses(CALs), Exchange Server on a virtual machines, Exchange Online Plans, hybrid environments and much more.
https://products.office.com/en-us/exchange/microsoft-exchange-licensing-faq-email-for-business