auraCount

Returns the debuff or buff count of a passed spell on a unit / object.

auraCount(unit, spellID, filter) : integer
-- alts
auracount(unit, spellid, filter) : integer
auras(unit, spellid, filter) : integer
1. SpellID from the class spellbooks 2. See Wowpedia for more information on WoW Unit IDs. 3. Use of object is also supported for unit. 4. filter ('HELPFUL' / 'HARMFUL')

Example

if auraCount('player', Iceicles, 'HELPFUL') > 2 then
return cast(Icelance, 'target')
end

Note

As stated above, use buffCount / debuffCount instead.