Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Counts the number of records per summarization group, or total if summarization is done without grouping.
To only count records for which a predicate returns true, use countif().
Note
This function is used in conjunction with the summarize operator.
Syntax
count()
Learn more about syntax conventions.
Returns
Returns a count of the records per summarization group, or in total if summarization is done without grouping.
Examples
The following example returns a count of events in states:
StormEvents
| summarize Count=count() by State
Output
| State | Count |
|---|---|
| TEXAS | 4701 |
| KANSAS | 3166 |
| IOWA | 2337 |
| ILLINOIS | 2022 |
| MISSOURI | 2016 |
| GEORGIA | 1983 |
| MINNESOTA | 1881 |
| WISCONSIN | 1850 |
| NEBRASKA | 1766 |
| NEW YORK | 1750 |
| ... | ... |