Eliminate an unnecessary count query