Move link-counting code to separate method.
Move link-counting code to separate method.

Also, count the links to a node when creating links, not initially when creating nodes.

sbai/viz3k,sbai/viz3k,sbai/viz3k