Updates number of pages rendered by pagination