I figured out a way a couple years back, and used it in a simulation game. Anyway, look at the code, specifically what I highlighted:
@echo off
Echo Coin flipper
pause > nul
set t1g4=0
set t1g5=0
set t1g6=0
set t1g7=0
set t2g4=0
set t2g5=0
set t2g6=0
set t2g7=0
cls
:begin
set /a scriptcount+=1
set /a rnd=%random%%%2
set /a gc+=1
if %rnd% equ 1 (set /a t1+=1) else (set /a t2+=1)
if "%t1%"=="4" set t1=0 & set t2=0 & set /a t1g%gc%+=1 & set gc=0
if "%t2%"=="4" set t1=0 & set t2=0 & set /a t2g%gc%+=1 & set gc=0
set /a total1=%t1g4%+%t1g5%+%t1g6%+%t1g7%
set /a total2=%t2g4%+%t2g5%+%t2g6%+%t2g7%
cls
echo Team 1 Wins: %t1%
echo Team 2 Wins: %t2%
echo -----
echo Amount of games it took to win series:
echo -----
echo Team 1 4 Games: %t1g4%
echo Team 1 5 Games: %t1g5%
echo Team 1 6 Games: %t1g6%
echo Team 1 7 Games: %t1g7%
echo -----
echo Team 2 4 Games: %t2g4%
echo Team 2 5 Games: %t2g5%
echo Team 2 6 Games: %t2g6%
echo Team 2 7 Games: %t2g7%
set /a total=%total1%+%total2%
if %total%==1000 goto done
goto begin
:done
pause > nul