Add s simple counter sample by function