Fix the edge cases, distinct aggregation with the same aggregation by adding equals and hashcode functions. Fix the Index Count test case