---
title: "count(label:)"
framework: createmlcomponents
role: symbol
role_heading: Instance Method
path: "createmlcomponents/classificationmetrics/count(label:)"
---

# count(label:)

Returns the number of times a label appeared in the ground truth collection.

## Declaration

```swift
func count(label: Label) -> Int
```

## Parameters

- `label`: The label.

## See Also

### Computing and scoring

- [makeConfusionMatrix()](createmlcomponents/classificationmetrics/makeconfusionmatrix().md)
- [precisionScore(label:)](createmlcomponents/classificationmetrics/precisionscore(label:).md)
- [recallScore(label:)](createmlcomponents/classificationmetrics/recallscore(label:).md)
- [count(predicted:)](createmlcomponents/classificationmetrics/count(predicted:).md)
- [count(predicted:label:)](createmlcomponents/classificationmetrics/count(predicted:label:).md)
- [trueNegativeCount(of:)](createmlcomponents/classificationmetrics/truenegativecount(of:).md)
- [truePositiveCount(of:)](createmlcomponents/classificationmetrics/truepositivecount(of:).md)
- [falseNegativeCount(of:)](createmlcomponents/classificationmetrics/falsenegativecount(of:).md)
- [falsePositiveCount(of:)](createmlcomponents/classificationmetrics/falsepositivecount(of:).md)
- [f1Score(label:)](createmlcomponents/classificationmetrics/f1score(label:).md)
- [mapLabels(_:)](createmlcomponents/classificationmetrics/maplabels(_:).md)
