Tree Visibility test from Codility

Get the number of visible nodes.