add option -p/--print-num-domains to print out the number of domains