javascript, distinct list - return number of dupes in list