[ Recorded Database | Reference Manual | Alphabetic Index ]

# recorded_count(+Key, -Count)

Returns the number of entries under the record key

Key
  A record name (atom/compound) or handle.
Count
  A variable or integer.

## Description

Unifies Count with the number of terms that are currently recorded under the key Key.

This is a constant-time operation.

### Modes and Determinism

- recorded_count(+, -) is det

### Exceptions

(4) instantiation fault
  Key is not instantiated.
(5) type error
  Key is neither atom, compound term, nor record handle.

## Examples

       ?-  record_create(R),
           recorded_count(R,C0),
           recordz(R,hello),
           recorded_count(R,C1).

       R = $&(record,"370guz")
       C0 = 0
       C1 = 1
       Yes (0.00s cpu)

## See Also

recorded_list / 2, record / 2, recorded / 2