Fixed race condition in test for unacknowledged batch insert by ensuring that the count is done on the same connection as the insert.