def METHOD_NAME(tmpdir, driver, testdata_generator):
    """Test if a call to OGR_L_GetFeatureCount has side effects for writing."""
    schema, crs, records1, records2, _ = testdata_generator(
        driver, range(0, 10), range(10, 20)
    )
    path = str(tmpdir.join(get_temp_filename(driver)))
    positions = {int(r['properties']['position']) for r in records1 + records2}
    with fiona.open(
        path,
        "w",
        driver=driver,
        crs=crs,
        schema=schema,
    ) as c:
        c.writerecords(records1)
        # Call to OGR_L_GetFeatureCount
        try:
            assert len(c) == len(records1)
        except TypeError:
            pass
        c.writerecords(records2)
    with fiona.open(path) as c:
        data = {int(f['properties']['position']) for f in c}
        assert len(positions) == len(data)
        for p in positions:
            assert p in data