pub fn packet_count(segments: &[TxSegment]) -> usize
Computes the number of packets in segments.
segments