How to detect whether there are projects that need to be reviewed?

I am trying to come up with an Applescript to detect whether any projects need to be reviewed. (The code I had was over inclusive: it basically said “yes, there are projects that are due for review” when no projects showed up in the Review perspective. Hence, I’ll hold off on posting that code to see if anyone has a good, unique solution.) Any thoughts?

Thanks in advance!

Here’s a first stab:

tell application "OmniFocus"
    tell default document
	set projectList to flattened projects whose next review date < (current date)
    end tell
end tell

Thanks. Trying to trigger the Review perspective if there are such projects. But when I do the following (tell blocks omitted), my debugger shows that nRev = 0:

set projectList to flattened projects whose next review date < (current date)
set nRev to count every project in projectList
my notify("nRev", nRev) -- debugger
if nRev > 0 then
my conditions("Review") -- subroutine that calls perspectives
return
end if

What are the review dates of the projects that are showing up when nRev is zero?