setMultiplicity
setMultiplicity(element, set)
Count the multiplicity of an element in a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.
Try it yourself:
$1 | setMultiplicity(1, [1, 2, 2, 4])
| |
$2 | setMultiplicity(2, [1, 2, 2, 4])
|