---
title: "numberOfItems(inSection:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uicollectionview/numberofitems(insection:)"
---

# numberOfItems(inSection:)

Fetches the count of items in the specified section.

## Declaration

```swift
func numberOfItems(inSection section: Int) -> Int
```

## Parameters

- `section`: The index of the section for which you want a count of the items.

## Return Value

Return Value The number of items in the specified section.

## See Also

### Getting the state of the collection view

- [numberOfSections](uikit/uicollectionview/numberofsections.md)
- [visibleCells](uikit/uicollectionview/visiblecells.md)
