in reply to Hash to count characters

As a one-liner:
perl -0777E '$s{$_}++ for split//,<>; say "$_ ", $s{$_}||0 for "a".."z +", "A".."Z"' your-data-file
I would count all characters, and at the end only display the characters you are interested in.