---
title: sampleCount
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlcountersamplebufferdescriptor/samplecount
---

# sampleCount

The number of instances of a counter set’s data that a counter sample buffer can store.

## Declaration

```swift
var sampleCount: Int { get set }
```

## Mentioned in

Creating a counter sample buffer to store a GPU’s counter data during a pass

## Discussion

Discussion The counter sample buffer instances you create with the MTLCounterSampleBufferDescriptor can store sampleCount instances of a counter set.

## See Also

### Configuring a descriptor for a counter sample buffer

- [counterSet](metal/mtlcountersamplebufferdescriptor/counterset.md)
- [label](metal/mtlcountersamplebufferdescriptor/label.md)
- [storageMode](metal/mtlcountersamplebufferdescriptor/storagemode.md)
