Check if there is any other character other than '0' or '1' . If so then set oneSeen to 0 to search again for new pattern
if ( getChar != '0' && str [ i ] != '1' ) { oneSeen = false ; } } return count ; }