small fix
added count
added command line options