updated ->count() to ->isEmpty()