This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Documentation / Mathematica / Built-in Functions / Programming / Pattern Matching /

Count

FilledSmallSquare Count[list, pattern] gives the number of elements in list that match pattern.

FilledSmallSquare Count[expr, pattern, levelspec] gives the total number of subexpressions matching pattern that appear at the levels in expr specified by levelspec.

FilledSmallSquare Level specifications are described in Section A.3.6.

FilledSmallSquare See Section 1.8.5 and Section 2.3.2.

FilledSmallSquare See also: FreeQ, MemberQ, Cases, Select, Position.

FilledSmallSquare Related package: Statistics`DataManipulation`.

FilledSmallSquare New in Version 1.

Further Examples