Looking at these two key rulings, I can see the distinction: a spell that fizzles due to invalid targets is still considered played because it completed the full play process, which means "when you play" triggers will fire. But a countered spell never finishes that process, so it doesn't count as played and won't trigger those effects. This means I should increment the cards played counter at the moment of play, before any resolution happens. The regulations are clear, and they partially refute the obvious repair: 350.1 — "A card is played when it has finished this process in its entirety." 359.3.e.10 — a spell whose targets all become invalid "has no effect but is still considered played" — and the example is literally "When you play a spell, give me +1 [M]". So: countered = never played, but target removed = played anyway
Your conclusion is correct — countered = never played, fizzled-by-invalid-targets = still played — but the timing model is not. Riftbound does not count a card as played when it hits the chain; per Rule 350.1, a card is only "Played when it has finished this process in its entirety," and for a spell that means actually resolving. That's exactly why "when you play" triggers fire at resolution completion (419.4.a), and why a countered spell is never considered played (425.1.b) — if you incremented the counter at the moment of play, a Defy'd spell would wrongly tick it.
So the correct implementation is: increment when the play process completes (spells: on resolution; permanents: when they leave the chain and enter the board), never on counter. The invalid-target case needs no special handling — the spell still resolves with its instructions skipped (359.3.e.10), so it counts and its "when you play" triggers fire just like normal.