Removing redundant call to port-count-lines