I want to count the number of times a custom predicate is true. For example, I have the following code:
is_man(john). is_man(alex). ?:-is_man(X).
count(P,Count) :- findall(1,P,L), length(L,Count).