count freq of char