Added neighbor counting.