Valid Phone Numbers (not on codechef)

How many valid numbers are possible? Write a C++ program that can compute the number of unique and valid phone numbers with the following set of constraints?
(a) A valid phone number is seven digits in length. Only digits are allowed.
(b) A valid number doesn’t begin with a zero or a one.
© A valid number is a sequence of digits that can be traced by the movements of a knight (Like in chess) on a normal telephone keyboard.
(d) Knight movement is illustrated below. Legal movements for (dot) are marked as X. For example, successors of number 8 could only be number 1 or 3.

For numpad, see

For knight movement, e.g. if you are at 2, possible moves are either 7 or 9.

Actually, i found this problem here, visit here for more clarity (Question No. 3)‎
plz help guys.