text: The last ability counts the number of spells that were cast before it resolved, not the number of spells that were cast before it was placed on the stack. For example, if you cast a sorcery and then respond to Sorcerer Class's triggered ability by casting an instant, both triggered abilities will deal 2 damage when they resolve.