There is no guarantee that the leaf can reaches to the member which has already be visited. Need to add 'visited' flag to the node, and prevent adding to the counter.