TsgcWSAPIKeyManager › Methods › Count
Returns the number of keys currently stored.
function Count: Integer;
Total number of entries in the key store including active, revoked, expired and rotated ones (but excluding entries already purged by PurgeExpired). (Integer)
Fast, thread-safe read — no iteration involved. Use it for capacity monitoring ("alert when we are approaching our licensed tenant count") and for quick assertions in tests. For a breakdown by status query Stats.ActiveKeys, Stats.RevokedKeys and Stats.ExpiredKeys instead.
LabelTotal.Caption := Format('Total keys in store: %d', [sgcWSAPIKeyManager1.Count]);