Count function always returns at least one row. So when you compare if rows returned is 0, then it fails and goes to the else statement. What you need to do is check the value returned by count or change the query to
SELECT 1 FROM TABLE WHERE FIRSTNAME = 'John' AND LASTNAME = 'Smith'