size

size(): Integer;

The size method of the ExternalCollection class returns the number of entries in the virtual collection.

As this method results in an SQL query that counts the rows in the selected tables mapped to the proxy class, you should use this method with caution if you expect a large number of rows in the result set.

Use the size64 method instead of the size method, if the number of entries in the collection could exceed the maximum integer value of 2,147,483,647.