generic count dup