examples/vm_power: add check for port count