Adds node counter functions to tree analyser

- Tree analyser now implements functions for counting the number of
nodes contained within a boundary box.