in reply to ASCII file

perl -E"undef$/;map{$a{$_}++}split//,<>;say qq/$_ => $a{$_}/for sort k +eys%a" test.txt