---
title: goalCount
framework: gameplaykit
role: symbol
role_heading: Instance Property
path: gameplaykit/gkbehavior/goalcount
---

# goalCount

The number of goals in the behavior.

## Declaration

```swift
var goalCount: Int { get }
```

## See Also

### Managing a Behavior’s Set of Goals

- [setWeight(_:for:)](gameplaykit/gkbehavior/setweight(_:for:).md)
- [weight(for:)](gameplaykit/gkbehavior/weight(for:).md)
- [remove(_:)](gameplaykit/gkbehavior/remove(_:).md)
- [removeAllGoals()](gameplaykit/gkbehavior/removeallgoals().md)
