Hello. The best way to show and hide the sprite would be to use the set visible action which "sets the object visible or invisible (hidden)." Measure the time with the dt expression (which gives you the amount of time in seconds since the last tick.) You can set up a variable and do a variable = variable + dt and than compare that variable to some given value, say 5 sec.
To count the number of times the sprite is visible/invisible, use a counter variable (instsance variable or a global one) and increment it when the sprite is shown or hidden.
For the gradual reduce of the time, the best way would be, in my opinion, to use some quadratic function of the counter variable mentioned above.