Returns the number of entries (for mappings or sequences).
number of entries, or 0 if not a collection.