question: public static int count ( String string , String mark ) { if ( ! TextUtils . isEmpty ( string ) && ! TextUtils . isEmpty ( mark ) ) { int count = 0 ; int index = string . indexOf ( mark ) ; while ( index != - 1 ) { count ++ ; string = string . substring ( index + mark . length ( ) ) ; index = string . indexOf ( mark ) ; } return count ; } return 0 ; }
target:  Count how many marks existed in string.