Typescript Count Array Javascript Duplicates Onedrive 365