*Edit* Added link.
If you are running the controller in Standalone mode, you need enough licenses of each license to cover the amount of APs you have. You must ensure that all licenses (e.g AP, PEF, RFP) cover the amount of APs you have.
For example, if you had 30 APs then you would need
30xAP
30xPEF etc.
If you are using a VMM, then the MM licenses/hardware must cover all Controllers and APs in addition to AP, PEF etc.
https://community.arubanetworks.com/aruba/attachments/aruba/unified-wired-wireless-access/73511/1/How%20Licensing%20works%20in%20AOS%208x.pdf