RVTDocs.com

FilteredElementCollector.GetElementCount

Method
Description:
Gets the number of elements in your current filter.
Remarks:
Does not require a filter, if called on a new FilteredElementCollector it will return a count of all the elements.
Syntax
public int GetElementCount()