---
title: "readAttributeDetachedRoleCount(completionHandler:)"
framework: matter
role: symbol
role_heading: Instance Method
path: "matter/mtrbaseclusterthreadnetworkdiagnostics/readattributedetachedrolecount(completionhandler:)"
---

# readAttributeDetachedRoleCount(completionHandler:)

## Declaration

```swift
func readAttributeDetachedRoleCount(completionHandler: @escaping @Sendable (NSNumber?, (any Error)?) -> Void)
```

```swift
func readAttributeDetachedRoleCount() async throws -> NSNumber
```
