Can your script count how often satoshidice gives 1x Lose in a row, 2x Lose in a row, 3x Lose in a row... and so on, in order to know if a martingale scheeme would be aplicable?

That's kind of tricky. Because you mean "3 times in a row for the same player" I expect. But I can't tell which bets are from which players, since some people use a different address each time they bet. I also can't tell for sure what order the bets were placed in - all I see is which block they are in.
One thing I can tell you for sure though is that the martingale scheme is never applicable for any game where the odds are in the house's favour... All martingale betting will do is change the odds so that instead of having a large (1 in 2) chance of losing a little ($1), you have a little (1 in 2048) chance of losing a lot ($1024).
Also, we know the exact odds for each of the SatoshiDice bets, and so can work out how often we get N losses in a row:
For the "under X" game, where X is a number between 1 and 64000, the probability of winning an individual bet is X/65536.
So the probability of losing an individual bet is (65536-X)/65536.
And so the probability of losing N bets in a row is ((65536-X)/65536)^N.
To give a concrete example, the probability of losing 3 times in a row (N=3) when betting 'under 32000' (X=32000) is:
((65536-X)/65536)^N
= ((65536-32000)/65536)^3
= 0.134
that's about 1 in 7.46287 times.
Another example: the probabiliy of losing 3 times in a row (N=3) when betting 'under 32768' (X=32768) is:
((65536-X)/65536)^N
= ((65536-32768)/65536)^3
= 0.125
that's exactly 1 in 8 times. Which is what you would expect; 'under 32768' is exactly a 50/50 bet, so there's 8 possible outcomes when you play 3 times, and only 1 of those 8 is "lose, lose, lose".