duplicate removal based on link count