adding countPages