setup before showing
Page count delegation and setting page number