Turning on sicstus command in swipl SWI-prolog
I started swi-prologand enter command:
swipl
It allowed me to use code of Mr. Roman Bartak from his lectures -nice example of blackboard usage
expects_dialect(sicstus).
sat_num(Query,_NumAnswers):-
bb_put(counter,0),
call(Query),
bb_get(counter,N),
N1 is N+1,
bb_put(counter,N1),
fail.