---
title: underestimatedCount
framework: swift
role: symbol
role_heading: Instance Property
path: swift/dictionary/underestimatedcount
---

# underestimatedCount

A value less than or equal to the number of elements in the collection.

## Declaration

```swift
var underestimatedCount: Int { get }
```

## Discussion

Discussion note: O(1) if the collection conforms to RandomAccessCollection; otherwise, O(n), where n is the length of the collection.

## See Also

### Iterating over Keys and Values

- [forEach(_:)](swift/dictionary/foreach(_:).md)
- [enumerated()](swift/dictionary/enumerated().md)
- [lazy](swift/dictionary/lazy.md)
- [makeIterator()](swift/dictionary/makeiterator().md)
