Debuff Stacks

Is there a way to get the number of deadly poison stacks or sunder armor stacks that are on a target? I have tried using UnitDebuff but it only returns a string of the debuff.
Any help would be appreciated
Any help would be appreciated