Check for count being not empty before altering pagination