implemented support for -c --count option