Adds number of pages to output