API:GetPlayerResistance

Returns how many resistances you have. GetPlayerResistance

Returns
a Number

Example
/script DEFAULT_CHAT_FRAME:AddMessage(GetPlayerResistance);

I think it returns the current amount of your resistances, for example 6.