Adding IndexBy and CountBy