So, assuming @Vitaliy.Serdtsev and @Robert Cemper answers we have:

Index ext [type = bitmap; Extent];

Is the must for every Persistent class, with standard ID, if we want to have fast answer on "How many records"

And the easiest and fastest "How many records" in this case is:

ClassMethod HowManyRecords(ByRef recordsCount as %Integer) As %Status

{
&sql(SELECT Count(1) INTO :recordsCount FROM schema_package.table)

IF SQLCODE<0 {WRITE "SQLCODE error ",SQLCODE," ",%msg QUIT}

}

Hi Tani!

Though /_spec endpoint can provide more info, indeed we can use the embedded /api/mgmnt/ entry, which is avaialble for your REST API on:

"http://localhost:9092/api/mgmnt/v1/USER/spec/pbuttons" , if you install it in NAMESPACE USER, and run docker with:

docker run --name my-iris -d --publish 9091:51773 --publish 9092:52773 intersystemsdc/irishealth-community:2020.2.0.196.0-zpm

To visualise the API I installed the module "swagger-ui":

USER>zpm

zpm: USER>install swagger-ui

[swagger-ui] Reload START

[swagger-ui] Reload SUCCESS

[swagger-ui] Module object refreshed.

[swagger-ui] Validate START

[swagger-ui] Validate SUCCESS

[swagger-ui] Compile START

[swagger-ui] Compile SUCCESS

[swagger-ui] Activate START

[swagger-ui] Configure START

[swagger-ui] Configure SUCCESS

[swagger-ui] Activate SUCCESS

and got the nice interface to the API on: 

http://localhost:9092/swagger-ui/index.html

All set )

Regarding the application error.

I installed the package via ZPM:

% docker run --name my-iris -d --publish 9091:51773 --publish 9092:52773 intersystemsdc/irishealth-community:2020.2.0.196.0-zpm

% docker exec -it my-iris iris session IRIS

Node: 18aa9f2b084c, Instance: IRIS

USER>zpm

zpm: USER>docker exec -it my-iris iris session IRIS

zpm: USER>install sys-perf-restapi                 

[sys-perf-restapi] Reload START

[sys-perf-restapi] Reload SUCCESS

[sys-perf-restapi] Module object refreshed.

[sys-perf-restapi] Validate START

[sys-perf-restapi] Validate SUCCESS

[sys-perf-restapi] Compile START

[sys-perf-restapi] Compile SUCCESS

[sys-perf-restapi] Activate START

[sys-perf-restapi] Configure START

[sys-perf-restapi] Configure SUCCESS

[sys-perf-restapi] Activate SUCCESS

zpm: USER>

Then opened http://localhost:9092/pbuttonsUI/index.csp
and got this error.

The application error log is empty: