Add method to count node