7-segment differences
JavaScript (ES6), 46 40 bytes

f=n=&gt;n?+"452331541"[n%10]||f(n/10|0)+2:2


Alternative formulation, also 46 40 bytes:

f=n=&gt;n?26523308&gt;&gt;n%10*3&amp;7||f(n/10|0)+2:2


Edit: Saved 6 bytes thanks to @xsot.