There are several getXXXCount method defined in the BaseGenericObjectPool class
BaseGenericObjectPool.getBorrowedCount
BaseGenericObjectPool.getCreatedCount
BaseGenericObjectPool.getDestroyedCount
But all of them are computed since the pool was created, that is, the count is accumulated.
I would ask how to figure out the number of being borrowed objects and being idle objects the moment when user asks for these count.