Solve the combination sum II problem, count the number of appearances for each number in the input number array.