Skip to content

Count

Counts the number of occurrences of a pattern in a list.

$ wo 'Count[{a, b, a, c, a}, a]'
3
$ wo 'Count[{1, 2, 3, 2, 1}, 2]'
2
$ wo 'Count[{1, 2, 3}, 4]'
0
$ wo 'Count[{x, x, x, y}, x]'
3