Desculpe, esqueci da questão do array. Bom, então assim:
#include <stdio.h>
static void increment(int goal, int a, int b, int c, int d) {
char count = 0;
if (goal == a)
count++;
if (goal == b)
count++;
if (goal == c)
count++;
if (goal == d)
count++;
if (count > 0)
printf("O %d apareceu %d vezes\n", goal, count);
}
int main() {
int a, b, c, d;
printf("Entre com um número de 4 digitos: ");
scanf("%1d%1d%1d%1d", &a, &b, &c, &d);
increment(0, a, b, c, d);
increment(1, a, b, c, d);
increment(2, a, b, c, d);
increment(3, a, b, c, d);
increment(4, a, b, c, d);
increment(5, a, b, c, d);
increment(6, a, b, c, d);
increment(7, a, b, c, d);
increment(8, a, b, c, d);
increment(9, a, b, c, d);
return 0;
}