 value;
    DBC *cursorp;
    int count, ret;

    cursorp = NULL;
    count = 0;

    /* Get the cursor */
    ret = dbp-&gt;cursor(dbp, txn, &amp;cursorp, <strong class="userinput"><code>0</code></strong>);
    if (ret != 0) {
        dbp-&gt;err(dbp, ret, "count_records: cursor open failed.");
        goto cursor_err;
    }

    /* Get the key DBT used for the database read */
    memset(&amp;key, 0, sizeof(DBT));
    memset(&amp;value, 0, sizeof(DBT));
    do {
        ret = cursorp-&gt;get(cursorp, &am