結果 : function to count numbers in python