How many bits from how many sensors? A trade-off in distributed nearest-neighbor learning