Leetcode Check If Number Has Equal Digit Counter Python