gives a count of the number of times sub appears in any order as sublist of list.
gives the number of sublists in list that match the general pattern patt in any order.
Details and Options
- In SubsetCount[list,patt], patt can be an expression with head List that includes pattern constructs such as PatternSequence, Repeated (..), Blank (_) and BlankSequence (__).
- The pattern patt can also be a pattern that matches a list but does not itself have head List.
- With the default option setting OverlapsFalse, SubsetCount includes only sublists that do not overlap. With the setting OverlapsTrue, it includes sublists that overlap.
Examplesopen allclose all
Basic Examples (2)
Properties & Relations (1)
The rules for counting are defined by the length of the result of SubsetCases: