<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def count(self, other, r, attrs=None, info={}):
 """ Gray & Moore based fast dual tree counting. r is the edge of bins: -inf or r[i-1] < count[i] <= r[i] attrs: None or tuple if tuple, attrs = (attr_self, attr_other) Returns: count, count, weight of attrs is not None """


        r = numpy.array(r, dtype='f8')

        return _core.KDNode.count(self, other, r, attrs, info=info)