Copying a spell only counts as casting it if the spell or ability that copies it specifically says it is to be treated as if it were cast. In general a spell counts as being cast only when it is cast from your hand or the spell or ability allowing you to utilize it specifically uses the terminology cast.