Nitrokey HSM2 Key Use Counter C Code Example

In HSM2: Distributed key access & sign counter I read:

A key use counter can be defined using the PKCS#11 module from sc-hsm-embedded and a proprietary attribute defined in [3].

Does someone have a C code example for setting – and testing – the key use counter attribute for an RSA or EC keypair on the Nitrokey HSM 2? I could only find an AES key generation example so far and I am not sure how to set the attribute for RSA / EC keys: