Enchant creature Whenever enchanted creature attacks, put a +1/+1 counter on it. Then if it has three or more +1/+1 counters on it, sacrifice Ordeal of Heliod. When you sacrifice Ordeal of Heliod, you gain 10 life.
The +1/+1 counter is put on the creature before blockers are declared and before combat damage is dealt.
The check of whether the enchanted creature has three or more +1/+1 counters on it happens as part of the resolution of the attack triggered ability. If the third +1/+1 counter is put on the enchanted creature any other way, you won't sacrifice the Ordeal until the next time the creature attacks.
If you sacrifice the Ordeal in some other way, its last ability will trigger.