I have done the job this way.
public static int DigitCount(string input, char matchChar = '0')
{
int count = 0;
int firstpost = 0;
int lastpos = 0;
string actualtext = "";
//string input = "####0.00%;(####0.0%);####0.0%";
firstpost = input.IndexOf(".") + 1;
lastpos = input.IndexOf(";");
actualtext = input.Substring(firstpost, lastpos - firstpost);
count = actualtext.Count(x => x == matchChar);
return count;
}