def count_node_match(self, pattern, adict=None):
mydict = self._filetree if adict is None else adict<EOL>k = <NUM_LIT:0><EOL>if isinstance(mydict, dict):<EOL><INDENT>names = mydict.keys()<EOL>k += len(filter_list(names, pattern))<EOL>for nom in names:<EOL><INDENT>k += self.count_node_match(pattern, mydict[nom])<EOL><DEDENT><DEDENT>else:<EOL><INDENT>k = len(filter_list(mydict, pattern))<EOL><DEDENT>return k<EOL>
Return the number of nodes that match the pattern.

:param pattern:

:param adict:
:return: int