TRAP_GET_CARDINALITY added

The get cardinality trap routine was added.
@loganom