Count Duplicate Elements In Array Python