I have this code
color(blue).
color(red).
color(blue).
color(green).
I want to make a rule that will count how many times the X color exists. For this case count_color(X) should return 2.
Is that possible in this way or i have to make a list with the colors?