# DiagnosticEventCollector.GetEventCount(string)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.diagnostics.diagnosticeventcollector/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.diagnostics.diagnosticeventcollector/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/Diagnostics/DiagnosticEventCollector.cs#L77)

```csharp
public int GetEventCount(string eventName)
```

Gets the count of events with the specified name.

### Parameters

- `eventName` (`string`)
