'Return count of callbacks for a given prefix or key or None
:param prefix: Categorize the callback
:type prefix: str or int
:param key: The key for the callback
:type key: object or str or dict
:rtype: None or int'

@sanitize_prefix
def pending(self, prefix, key):

    if ((not (prefix in self._stack)) or (not (key in self._stack[prefix]))):
        return None
    return len(self._stack[prefix][key])
