I need to update some rows on the MySQL database by PyMYSQL and I want to know **how many rows had been changed.**

```
import pymysql
db = pymysql.connect(xxxx)
cur = db.cursor()
sql = "update TABLE set A = 'abc' where B = 'def'"
cur.execute(sql, params)
db.commit()

```