#include <db_cxx.h> int Dbc::count(db_recno_t *countp, u_int32_t flags);
         The Dbc::count() method returns a count of the number of data
         items for the key to which the cursor refers.
    
         The Dbc::count() 
            
            
                method either returns a non-zero error value or throws an
                exception that encapsulates a non-zero error value on
                failure, and returns 0 on success.
            
        
    
The countp parameter references memory into which the count of the number of duplicate data items is copied.
                         The Dbc::count() 
            
            
                method may fail and throw a DbException 
                exception, encapsulating one of the following non-zero errors, or return one
                of the following non-zero errors:
            
        
                    
                When a client synchronizes with the master, it is possible for committed
                transactions to be rolled back. This invalidates all  the database and cursor
                handles opened in the replication environment. Once this occurs, an attempt to use
                such a handle will 
                
                    throw a DbRepHandleDeadException (if
                    your application is configured to throw exceptions), or 
                
                return DB_REP_HANDLE_DEAD.
                The application will need to discard the handle and open a new one in order to
                continue processing.
            
The operation was blocked by client/master synchronization.
                DbDeadlockException is thrown if
                your Berkeley DB API is configured to throw exceptions.
                Otherwise, DB_REP_LOCKOUT is returned.