My 1.12 solution can be found here. When trying to update command blocks to 1.13, I have the following:
scoreboard objectives add invert dummy
(run at start) then:
scoreboard players set FakePlayer invert 1
(impulse unconditional repeat) chained into:
execute at @e[tag=summoned] run scoreboard players reset FakePlayer invert
(chain unconditional repeat) chained into:
execute if score FakePlayer invert = 1 invert run say "All summoned animals are dead!"
This should reset FakePlayers score continuously until all entities with tag "summoned" are dead, then it should run the final condition. This does not happen, and I can't see why.