Understanding the number of rows affected with UPSERT operation