How To Count Frequency Of Elements In Array In Python