count = count * 10 + int(c) shouldn’t it be just count = int(c)?
count = count * 10 + int(c)
count = int(c)