Move link-counting code to separate method.

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