I don't think you can. The underlying ADODB library has affected_rows() but the Moodle layer on top doesn't appear to expose it.
You would need to do a separate count_records() or similar.
I am now waiting to be corrected
You would need to do a separate count_records() or similar.
I am now waiting to be corrected