crypto-native: introduce counter struct