As far as I can tell, RowsAffected should already work.

The reason I had to change this code was that the current code doesn't care about properly separating the "echo" of the command actually executed from the number of rows affected.  I needed to access both.