I'm trying to modify it's value inside a horizontal exception to fire again in X raster lines more and it seems to completely ignore the value, instead fires again at the previous value, but strangely enough half screen later takes my value into account (?!?).

My first suspicion was that the value that counts is taken at the end of the v-blank, but no, after a while seems to work.

Any crazy idea?

How I'm doing is:
1) In v-blank I set reg10 to a in screen value
2) In a first h-exception I set reg10 to a second in screen value
3) In a second h-exception I set reg10 to 0xFF

The VDP has a counter that is decremented on every line. When the counter
has expired, and if bit 4 (IE1) of register #0 is set, then a level 4
interrupt will occur.
The counter is loaded with the contents of register #10 in the following
situations:
- Line zero of the frame.
- When the counter has expired.
- Lines 225 through 261. (note that line 224 is not included)
The counter is *not* loaded when register #10 is written to.

I spent a long time trying to get this to work myself. I did manage to eventually get my raster effects working, changing the counter during the hblank. I'm not entirely sure why it works though, it was all trial and error. You kind of have to start changing it 2 steps before you want to see the change.

The issue is the countdown "internal register" gets update before any horitzontal exception instruction has the change to be executed.

Yes, going two steeps ahead works but involves doing more cases/code, and what I was trying to do is self-changing code to be really fast, an then it must be placed on RAM and be really short. I guess the wining strategy is to do a jump from RAM to ROM like "Sonic 3" does, that allows to change next h-excp routine easily depending on the varying needs.

Well, two steps ahead is not that problematic (even if a bit annoying)... the problem is what you do the first time - the first two interrupts have to happen with the same interval, no way to avoid that situation.