count duplicates for llist