Number of Segments in a String

给一个字符串, 问有几个组成.