I am trying to count how many times the name "Bob" appears in all classes.
I have these facts:
(deffacts classes
(class 11A Peter Jack Samuel Bob Bob)
(class 10A Lucy James John Michael Bob)
(class 9A Bob Martin Josepth Thomas Chris Daniel)
)
The expected result is 4.
I have tried looking for a function that would count the number of occurances of a value in a list but without success.
For individual classes: