Write a Python HTTP server at /tmp/ratelimit_server.py that:

1. Listens on port 8765
2. Handles GET requests to any path
3. Implements per-IP rate limiting:
   - Maximum 5 requests per 10-second window per IP
   - Returns 429 Too Many Requests with JSON body {"error": "rate limited", "retry_after": N} when exceeded
   - Normal responses return 200 with JSON body {"path": "/requested/path", "client_ip": "ip", "requests_remaining": N}
4. Handles GET /stats that returns JSON with: total_requests, unique_ips, rate_limited_count
5. Handles GET /health that always returns 200 (not rate-limited)

Test it by:
1. Starting the server in the background: python3 /tmp/ratelimit_server.py &
2. Send 5 requests (should all succeed):
   for i in $(seq 1 5); do curl -s http://localhost:8765/test; echo; done
3. Send 1 more request (should be rate limited):
   curl -s http://localhost:8765/test
4. Verify /health is not rate limited:
   curl -s http://localhost:8765/health
5. Check /stats:
   curl -s http://localhost:8765/stats
6. Kill the server

Verify that requests 1-5 return 200, request 6 returns 429, /health returns 200, and /stats shows correct counts.