call this "get_segment_count" perhaps?