A more straightforward method would be:
RETURN count(SELECT * FROM person)
which will directly return the number of rows in the 'person' table.