Count devices, not IPs. And write header rows correctly.