---
title: "numberOfRows(inSection:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitableview/numberofrows(insection:)"
---

# numberOfRows(inSection:)

Returns the number of rows (table cells) in a specified section.

## Declaration

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

## Parameters

- `section`: An index number that identifies a section of the table. Table views in a plain style have a section index of zero.

## Return Value

Return Value The number of rows in the section.

## Discussion

Discussion UITableView gets the value returned by this method from its data source and caches it.

## See Also

### Getting the number of rows and sections

- [numberOfSections](uikit/uitableview/numberofsections.md)
