Count Distinct Elements In Array Javascript Methods In Selenium