In some cases we need to get event_base's number of priorities that was set earlier by event_base_priority_init().
I've added a function for that: event_base_get_npriorities(). Please see the patch attached.
[PATCH] Add event_base_get_npriorities() function
Looks good. I'm merging it to master, and making it (and event_base_priority_init()) thread-safe.