```\nfunction getLockedCount(address holder) external returns (uint amount) {\n    amount = 0;\n    DelegationController delegationController = DelegationController(contractManager.getContract("DelegationController"));\n    uint[] memory delegationIds = delegationController.getDelegationsByHolder(holder);\n    for (uint i = 0; i < delegationIds.length; ++i) {\n        uint id = delegationIds[i];\n        if (isLocked(getState(id))) {\n            amount += delegationController.getDelegation(id).amount;\n        }\n    }\n    return amount + getPurchasedAmount(holder) + this.getSlashedAmount(holder);\n}\n```\n