ionic: count SGs in packet to minimize linearize