追記として、

#include<cctype>
#include<iostream>
using namespace std;
int strch_cnt(const char* s,char c)
{
int i=0;
while (*s)
{
if(*s == c) i++;
s++;
}
return i;
}
int main()
{
char s[40];
char c;
cout << "文字列:";
cin >> s;
cout << "\n";
cout << "カウントする文字:";
cin >> c;
cout <<"\n";
cout << "文字数は:"<< strch_cnt(s,c) << "\n";
return 0;
}

↑のプログラムを参考に作ればいいとのことですが、
どうやって数字の個数のみを求め、表示させればいいのかが分かりません