```
class Node:
    def init(self):
        self.parent = None
        self.left = None
        self.right = None

    def count(self):
        c = 0
		
		# count all inner nodes
        if self.left:
            c = self.left.count()
			
		if self.right:
			c += self.right.count()
		
		# the current count needs also be counted
		c += 1
		
		return c
```
class Node:
    def init(self):
        self.parent = None
        self.left = None
        self.right = None

    def count(self):
        c = 0
		
		# count all inner nodes
        if self.left:
            c = self.left.count()
			
		if self.right:
			c += self.right.count()
		
		# the current count needs also be counted
		c += 1
		
		return c