Get correct page count