Property :: count - Get number of instances in a collection
The count property returns the number of instances stored in the collection. Since some indexes store multiple references to instances (array index) or do not store all instances in the index (suppress empty option), the function returns rather the number of instances referenced in an index than the number of instances in the collection. Usually these numbers are, however, identical. In order to ensure that you get the collection instance count, one may select the default access key ( setAccessKey() ).
Accessing the property throws an exception when the collection is not accessible, e.g. when no instance is selected in the parent property or when the property handle is not valid.
The value contains the number of items to be processed or stored in a collection.