add pulse counting example