Does campaign battle counts for battles in alliance missions?

I like the campaign but will not do more than necessary there if it doesn’t count for alliance missions.
I guess the campaign battles do not count when I did them already. But when I do them the first time? Or when I did them already in “starter” mode - do they count when I do them in “intermediate” the first time?

If you win it counts if you lose it doesn’t (from my experience)