countPersistentInstances64(): Integer;
The countPersistentInstances64 method of the Class class returns the number of non‑exclusive persistent instances of the receiver class.
The countPersistentInstances64 method is significantly faster than the size method on an instances pseudo‑collection, as shown in the following code fragments.
write Customer.instances.size;
write Customer.countPersistentInstances64; // significantly faster
This method impacts other users of the database file where the instances of the receiver class are stored. The best time to run this method is therefore when there are few other active users.