Binary Search Tree Digits Frequency

Given a binary search tree whose nodes are integers, find the frequency
of occurrence of each digit in the tree.