implemented counting registered callbacks + count for triggers (not tested)