NSCountCommand Class Reference

Inherits from
Conforms to
Available in OS X v10.0 and later.
Declared in
Companion guide


An instance of NSCountCommand counts the number of objects of a specified class in the specified object container (such as the number of words in a paragraph or document) and returns the result.

NSCountCommand is part of Cocoa’s built-in scripting support. It works automatically to support the count command through key-value coding. Most applications don’t need to subclass NSCountCommand or call its methods.