converting the sub - string starting from index ' i ' and having length ' len ' to int and checking if it is greater than X or not
if ( stoi ( S . substr ( i , len ) ) > X ) count ++ ; } } } return count ; }