Convert the integer to a string, convert that string to a set of characters, then get the size of the set.
>>> N = 12334456
>>> len(set(str(N)))
6
I am indebted to Stefan Pochmann for teaching me something. (See the comments.)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…