Changes Relation#empty? to use total count to avoid double distinct
problem