retrieve incremental count as argument when up and down
added sample code
modified