The getCount method of the ObjectDictionary class returns an integer indicating the number of items in the ObjectDictionary.
public int getCount();