Sample Code below.Opening the window (ctrl-D) increases the counter. If the window is not opened the counter does not increase.
<text dt>
/ items = ("<%script.currenttrialnumber%>")
</text>
<trial dummy>
/ stimulustimes = [0=dt]
/ timeout = 1000
/ posttrialpause = 200
</trial>
<counter unused>
/ select = sequence (1,2,3,4,5,6,7,8,9,10)
</counter>
<block dummy>
/ trials = [1-10=dummy]
</block>
<expt>
/ blocks = [1=dummy]
</expt>