Added PAPI library. This should be done in a smarter way.
Use PAPI to count events.