As seen here:
The code performs count() on a PDOStatement, but PDOStatement's are not countable objects. On PHP 7 this will emit an error. On PHP 5 this will always result in a true statement (because count() on an object that does not implement Countable always returns 1)