Count user sessions from logs | Google Interview Question