added method for counting callbacks for debugging, added tests