Do a check to see if more than 1 person is alive, then start a timer?

How could I do a check to see if more than 1 person is alive on a team, then start a timer based on that?

[lua]alive = 0
for k, v in pairs( player.GetAll() ) do
if v:Alive() and v:Team() == TEAM then
alive = alive + 1
end
end

if alive > 1 then
timer.Create( TIMER_NAME, TIMER_TIME, TIMER_REPEATS, function()
–Code
end )
end[/lua]
Like that, hooked into GM:Think() and obviously changing everything in which is in UPPER case

EDIT; Changed, misread what you wanted done.

[lua]

local n = 0
function AreTwoAlive()
for k, v in pairs(player.GetAll()) do
if v:Alive() then
n = n + 1
end
end

if n >= 2 then
	timer.Simple(6, function()
						--This is where you'd put what you want to do.
						end )

end

end
[/lua]