add test case for countduplicate