Implemented counting throught paginator