<!--
{
  "availability" : [
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSBrowserDelegate/browser(_:numberOfChildrenOfItem:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSBrowserDelegate(im)browser:numberOfChildrenOfItem:"
  },
  "title" : "browser(_:numberOfChildrenOfItem:)"
}
-->

# browser(_:numberOfChildrenOfItem:)

Asks the delegate for the number of children the given item has.

```
@MainActor optional func browser(_ browser: NSBrowser, numberOfChildrenOfItem item: Any?) -> Int
```

## Parameters

`browser`

The browser.

`item`

The item that has some number of children.

## Return Value

The number of children.

---

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)