How to get the number of PMU architectural and microarchitectural events in A72 or R5F?

Hi, 

   I want to get the number of architectural and microarchitectural events in our program.

   Is there a good way to get these values?

Thanks!