scripts: Fix to ensure that port connection count is always set
scripts: Fix to ensure that port connection count is always set

This patch ensures that the port connection count is set to zero in those
cases when the port is not connected.

Weil0ng/gem5,rallylee/gem5,TUD-OS/gem5-dtu,KuroeKurose/gem5,SanchayanMaity/gem5,samueldotj/TeeRISC-Simulator,cancro7/gem5,TUD-OS/gem5-dtu,KuroeKurose/gem5,briancoutinho0905/2dsampling,gem5/gem5,kaiyuanl/gem5,HwisooSo/gemV-update,yb-kim/gemV,austinharris/gem5-riscv,HwisooSo/gemV-update,rjschof/gem5,gedare/gem5,Weil0ng/gem5,TUD-OS/gem5-dtu,aclifton/cpeg853-gem5,KuroeKurose/gem5,cancro7/gem5,gedare/gem5,Weil0ng/gem5,samueldotj/TeeRISC-Simulator,rjschof/gem5,briancoutinho0905/2dsampling,HwisooSo/gemV-update,qizenguf/MLC-STT,joerocklin/gem5,joerocklin/gem5,HwisooSo/gemV-update,rjschof/gem5,zlfben/gem5,kaiyuanl/gem5,TUD-OS/gem5-dtu,qizenguf/MLC-STT,TUD-OS/gem5-dtu,sobercoder/gem5,gem5/gem5,rjschof/gem5,KuroeKurose/gem5,sobercoder/gem5,aclifton/cpeg853-gem5,yb-kim/gemV,rallylee/gem5,qizenguf/MLC-STT,qizenguf/MLC-STT,cancro7/gem5,markoshorro/gem5,markoshorro/gem5,kaiyuanl/gem5,powerjg/gem5-ci-test,austinharris/gem5-riscv,powerjg/gem5-ci-test,Weil0ng/gem5,KuroeKurose/gem5,gem5/gem5,austinharris/gem5-riscv,TUD-OS/gem5-dtu,cancro7/gem5,joerocklin/gem5,zlfben/gem5,rallylee/gem5,markoshorro/gem5,zlfben/gem5,gem5/gem5,powerjg/gem5-ci-test,sobercoder/gem5,HwisooSo/gemV-update,Weil0ng/gem5,SanchayanMaity/gem5,Weil0ng/gem5,kaiyuanl/gem5,samueldotj/TeeRISC-Simulator,joerocklin/gem5,gem5/gem5,aclifton/cpeg853-gem5,qizenguf/MLC-STT,samueldotj/TeeRISC-Simulator,qizenguf/MLC-STT,markoshorro/gem5,SanchayanMaity/gem5,joerocklin/gem5,rallylee/gem5,gedare/gem5,samueldotj/TeeRISC-Simulator,SanchayanMaity/gem5,gedare/gem5,kaiyuanl/gem5,powerjg/gem5-ci-test,briancoutinho0905/2dsampling,yb-kim/gemV,gem5/gem5,samueldotj/TeeRISC-Simulator,rallylee/gem5,gem5/gem5,aclifton/cpeg853-gem5,aclifton/cpeg853-gem5,rjschof/gem5,gedare/gem5,sobercoder/gem5,rjschof/gem5,sobercoder/gem5,austinharris/gem5-riscv,briancoutinho0905/2dsampling,SanchayanMaity/gem5,gedare/gem5,rjschof/gem5,joerocklin/gem5,rallylee/gem5,markoshorro/gem5,markoshorro/gem5,sobercoder/gem5,HwisooSo/gemV-update,SanchayanMaity/gem5,briancoutinho0905/2dsampling,aclifton/cpeg853-gem5,qizenguf/MLC-STT,austinharris/gem5-riscv,yb-kim/gemV,kaiyuanl/gem5,KuroeKurose/gem5,austinharris/gem5-riscv,zlfben/gem5,Weil0ng/gem5,joerocklin/gem5,kaiyuanl/gem5,yb-kim/gemV,markoshorro/gem5,zlfben/gem5,powerjg/gem5-ci-test,austinharris/gem5-riscv,HwisooSo/gemV-update,aclifton/cpeg853-gem5,zlfben/gem5,sobercoder/gem5,briancoutinho0905/2dsampling,samueldotj/TeeRISC-Simulator,gedare/gem5,KuroeKurose/gem5,cancro7/gem5,yb-kim/gemV,yb-kim/gemV,zlfben/gem5,cancro7/gem5,powerjg/gem5-ci-test,rallylee/gem5,cancro7/gem5,yb-kim/gemV,joerocklin/gem5,SanchayanMaity/gem5,briancoutinho0905/2dsampling,powerjg/gem5-ci-test,TUD-OS/gem5-dtu