return the number of affected rows on an update query