This is a DP problem. Define dp[digit][hops] as the number of distinct numbers you can dial starting from digit with hops remaining. The base case: dp[digit][1] = 1 for all digits.
The transition uses a precomputed adjacency map. From each digit, a knight can jump to specific others. For example, from you can reach and . From you can reach and .
For each hop, sum up the counts from all digits the knight could have come from. You only need the previous hop's values, so you can use arrays instead of a full D table.