Work for counting up or down