How many steps does it take from n to 1 by subtracting the greatest divisor?
Jelly, 9 bytes
ÆṪÐĿÆFL€S

Try it online! or verify all test cases.
Background
The definition of sequence A064097 implies that

By Euler's product formula

where φ denotes Euler's totient function and p varies only over prime numbers.
Combining both, we deduce the property

where ω denotes the number of distinct prime factors of n.
Applying the resulting formula k + 1 times, where k is large enough so that φk+1(n) = 1, we get

From this property, we obtain the formula

where the last equality holds because ω(1) = 0.
How it works
ÆṪÐĿÆFL€S  Main link. Argument: n

  ÐĿ       Repeatedly apply the link to the left until the results are no longer
           unique, and return the list of unique results.
ÆṪ           Apply Euler's totient function.
           Since φ(1) = 1, This computes φ-towers until 1 is reached.
    ÆF     Break each resulting integer into [prime, exponent] pairs.
      L€   Compute the length of each list.
           This counts the number of distinct prime factors.
        S  Add the results.