void log_event(const char* msg, int* count) {
    printf("[%d] %s\n", *count, msg);
    (*count)++;
}
