Count Number Of Duplicate Elements In Array Python