Count even steps of 196 algorithm In the 196-algorithm one starts from an integer and then adds its reverse to it until a palindrome is reached, like this:

start -&gt; 5280
5280 + 0825 = 6105
6105 + 5016 = 11121
11121 + 12111 = 23232
-end-


Write a function that counts how many even numbers are visited before the algorithm ends. Starting and ending numbers are also counted, so, in the example above, visited are consider the numbers: 5280, 6105, 11121, 23232 but not 825, 5016 and 12111.

Examples:

f(5280) = 2
f(56) = 1
f(59) = 1
f(89) = 13


Extended code golf rules apply: shortest number of instructions and operations (like +,-,mod,print,while,if,...) wins.
Python - 10 operations

def f(n):
    q=str(n)
    p=q[::-1]
    return 1-n%2+(q!=p and f(n+long(p)))