やりたい事と違うかもだけど、プロセスが無ければ他の処理する案
tell application "System Events"
set p to every process whose name is "Safari"
if p is {} then
display dialog "-1"
else
if (exists window 1 of process "Safari") then
display dialog "1"
else
display dialog "0"
end if
end if
end tell