Show correct number of pages based on metadata from API