---
title: underestimatedCount
framework: swift
role: symbol
role_heading: Instance Property
path: swift/array/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 an Array’s Elements

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