Code:
CountList[A_, n_, x_] := If[n == 0,
Return[0];
,
If[A[[n]] == x,
Return[1 + CountList[A, n - 1, x]];
,
Return[CountList[A, n - 1, x]];
];
];