Add linear counter
Add quick and dirty derivation for linear counter