Given a DataFrame of user events, return the total number of events per user, sorted by user_id ascending.
df
| column | type |
|---|---|
| user_id | int |
| event_type | str |
| user_id | event_type |
|---|---|
| 1 | click |
| 2 | view |
| 1 | purchase |
| 3 | click |
| 2 | click |
| 3 | view |
| user_id | event_count |
|---|---|
| 1 | 2 |
| 2 | 2 |
| 3 | 2 |
Each user appears exactly once in the output with a count of how many rows they had in the input.
df shape = (5, 2), columns: user_id, event_type