create counter

ab logic