Correctly update node and edge counts when parsing DOT and GML files