Some numbers are formed with closed paths. The digits 0, 4, 6 and 9 each have 1 closed path, and 8 has 2. None of the other numbers is formed with a closed path. Given a number, determine the total number of closed paths in all of its digits combined.