code: public Observable<Integer> run(Observable<String> commands) {
          return commands.reduce(Observable.<Integer> empty(),
                  new Func2<Observable<Integer>, String, Observable<Integer>>() {
                      @Override
                      public Observable<Integer> call(Observable<Integer> dep, String command) {
                          return update(command).dependsOn(dep).count();
                      }
                  }).flatMap(Functions.<Observable<Integer>> identity());
      }
docs: Returns an {@link Observable} that is the result of running a sequence of
  update commands (insert/update/delete, ddl) read from the given
  {@link Observable} sequence.
  
  @param commands
  @return