Changed count to number of pages