結果 : function to count letters in python