I tried to recreate the problem just now and I’m beginning to think the above example isn’t quite representative of how the bug typically behaves. I configured my script to call /streams until it gets data for about 450 top streams. I ran it in terminal repeatedly with random breaks in between each execution until I found suspicious viewer counts. I’ve probably ran it about 30 times and came up with 2 instances where the viewer count for a stream shows up as 0. I’ve tried to recreate the problem again by repeatedly running the script with almost no breaks in between, and I haven’t been able to get the bug to show up. Maybe it’s my luck, but that’s what I have for now.
As an aside, I’m pretty sure you’re aware of this, but /streams very often returns objects out of order. For example, if Stream A has a higher viewer count than Stream B, it would make sense for Stream A to come before Stream B, but this is often not the case. In fact, about 10-20% of returned stream objects are out of order. Maybe the ordering thing is intentionally done for performance reasons, which I can understand.