Use notempty() instead of count().