This is Discussion thread about Count Digits
Discussion About Count Digits
test case fails ??
while doing the question test case fails so is that mean we have to take inputs and check for the extreme values that the digits are given so as to reject any other value rather than desired input. so we will break OR take input again for wrong inputs.
your program is on the wrong track. first cross check it