I have done some researching on this topic but everything I have tried doesn't work properly. I just want to add a counter to certain aspects of my batch file. The count.txt file contains:

```
Counters started on 2-18-15
opened: 0
actions: 0

```

The script that I have written so far is:

```
    setlocal enabledelayedexpansion

    for /F "usebackq tokens=2" %%r in (`findstr opened: counter.txt`) do (
    echo %%r
    set opened=%%r
    set /a opened=!opened!+1
    echo opened= !opened!
    )

```

I would like to just edit the number of opened times and not change anything else in the file. I know this is rememdial but I am still very remedial in my batch abilities. 

I have specified ! in place of %, using some debugging it is pulling the correct variable and adding 1 to it, the current issue is that it is not saving over that variable afterwards.