add total pages function to ListResource