Added count number and better command options handling