CARDINALITY operator gets the number of elements in a nested table.
SQL>
SQL> CREATE OR REPLACE PROCEDURE cardinality_example AS
2 TYPE nestedTableType IS TABLE OF VARCHAR2(10);
3 myTable1 nestedTableType;
4 cardinality_var INTEGER;
5 BEGIN
6 myTable1 := nestedTableType('F', 'G', 'S');
7 cardinality_var := CARDINALITY(myTable1);
8 DBMS_OUTPUT.PUT_LINE('cardinality_var = ' || cardinality_var);
9 END cardinality_example;
10 /
Procedure created.
SQL> CALL cardinality_example();
cardinality_var = 3
Call completed.
SQL>
SQL>