pub fn packet_frame_count(packet: &[u8]) -> Result<usize>
Get number of frames in a packet.
Returns an error if the packet cannot be parsed.