fix bug with count pages for paginator in index page