% WAMVM VM test: `findall/3` where the goal is passed via a variable.

p(1).
p(2).
p(3).

count_solutions(Goal, Count) :-
    findall(1, Goal, Ones),
    length(Ones, Count).

ok :-
    count_solutions(p(_), Count),
    Count == 3.

