page count, looping over pages