def count_palindromes(num1, num2):
    return sum(str(x) == str(x)[::-1] for x in range(num1, num2 + 1))

bff4f07faf349f53dcaf66f92e6474a4d934dae1
<mask token>

def count_palindromes(num1, num2):
    return sum(str(x) == str(x)[::-1] for x in range(num1, num2 + 1))
