code: def test_rowcount_on_executemany_returning(self):
      cur = self.conn.cursor()
      try:
          cur.execute("drop table execmany")
          self.conn.commit()
      except psycopg2.DatabaseError:
          self.conn.rollback()
  
      cur.execute(
          "create table execmany(id serial primary key, data int)"
      )
      cur.executemany(
          "insert into execmany (data) values (%s)",
          [(i,) for i in range(4)],
      )
      self.assertEqual(cur.rowcount, 4)
  
      cur.executemany(
          "insert into execmany (data) values (%s) returning data",
          [(i,) for i in range(5)],
      )
      self.assertEqual(cur.rowcount, 5)
  
imports: import gc
  import sys
  import time
  import ctypes
  import pickle
  import psycopg2
  import psycopg2.extensions
  import unittest
  from datetime import date
  from decimal import Decimal
  from weakref import ref
  from .testutils import ConnectingTestCase, skip_before_postgres, skip_if_no_getrefcount, slow, skip_if_no_superuser, skip_if_windows, skip_if_crdb, crdb_version
  import psycopg2.extras
label_desc: Use image node_id 24 for calling the CursorTests obj's underlying member method code with example usage: obj.test_rowcount_on_executemany_returning() without return types