Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non-Count the number of segments in a string, w
Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non-Count the number of segments in a string, w