Removing Duplicate Count Queries