Usually guaranteed money has been signing bonus dollars but that is changing into both signing bonus and salary dollars in some contracts.
The answer is all money counts against the cap. Signing bonus money is amortized over the length of the contract. For example, a 20 million bonus on a contract of five years adds 4 million to the cap charge each year. 20 million/5 years. The total cap charge that year is any amortized signing bonus plus that years salary.
If a player is cut prior to the contract ending, any remaining salary bonus money not previously recognized gets immediately recognized. Any salary, not explicitly guaranteed, no longer counts again the cap. Guaranteed salary from future years would be immediately recognized.