I want to count a specific element in a list.
?count(3,[3,3,3],C).
count(_,[],_).
count(X,[Y|R],C):- X \= Y, count(X,R,C).
count(X,[Y|R],C):- X = Y, L is C + 1, count(X,R,L).
But I get this error and I do not see why: Arguments are not sufficiently instantiated In: [1] count(3,[3,3|...],_1594)
Do you have a tipp?