get an integer from pageable collection
deal with async issue on paginated records