SQL Server - Stopping a server side trace
I figured out a way to do it.

declare @files table (ID int IDENTITY, FileName varchar(100))
insert into @files execute xp_cmdshell 'dir d:\Output\*.trc /b'


Checking the file count and if it is at my limit then I lookup the trace id and use sp_trace_setstatus  to stop it. Since my trace files take a while to get up to the filesize limit, I run this job every 5 or 10 minutes on agent.