Zend certified PHP/Magento developer

Adding variables in a batch file in Windows

I’m trying to fix something that’s simple but yet can’t seem to put my finger on it.
I have this very simple batch file that when you drop a folder on it it converts a bunch of files to another format. I’m trying to add a progress indicator to the title bar but for some reason I can’t get the set /a to add a value and return anything other than the value I initially put in.
here’s the code

    set Count=0
set NumFiles=0
set oldpct=-1
for %%A in (*.t64) do set /A NumFiles += 1
echo File count = %NumFiles%
echo.
echo Converting...
rem Parse every file in the folder and perform the magic.
for %%x in (*.t64) do (
set /A "Count += 1"
echo count: %Count%
pause
set /A pct=100*%Count%/%NumFiles%
[where i do the file conversion]
rem calculate progress
    if "%pct%" gtr "%oldPct%" (
            set oldPct=%pct%
            echo %pct%
            title Progress: %pct%/100
    )
)
pause
exit

I deliberately omitted a part of the code at the start and the end in order to keep things short.

For some reason, the %count% and the %pct% refuses to be calculated…