Implement a singleton counter for SSE ids