<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTableView/numberOfRows",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTableView(py)numberOfRows"
  },
  "title" : "numberOfRows"
}
-->

# numberOfRows

The number of rows in the table.

```
var numberOfRows: Int { get }
```

## Discussion

Typically you should not ask the table view how many rows it has; instead, interrogate the table view’s data source.

## See Also

[`numberOfRows(in:)`](/documentation/AppKit/NSTableViewDataSource/numberOfRows(in:))

Returns the number of records managed for `aTableView` by the data source object.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)