statuses.id, statuses.title, statuses.slug, count(projects.id) as count from statuses inner join projects on projects.status_id = statuses.id where (projects.deleted_at is null) and statuses.deleted_at is null group by statuses.id) #3