Adding number of duplicates.