Hi Christoph,
If you want the number of records in the table, then why not get it from M_CS_TABLES itself. You have a column RECORD_COUNT which can tell you number of records and you can pass schema name and table name as input the the query. Something like:
SELECT RECORD_COUNT into lv_number from M_CS_TABLES
where schema_name = :cacheschema_name
and table_name = :cachetable_name;
Regards,
Ravi