Better not write such a complex query with the ORM and just use the query builder or normal queries.
The query will probably look something like this if you use the query builder:
DB::select(
'node.catergory_id',
'catinfo.name',
array(DB::expr('COUNT(`parent.category_id`) - 1'), 'depth')
)
->from(array('category', 'parent'), array('category', 'node'))
->join('catinfo', 'LEFT')
->on('catinfo.category_id', '=', 'node.category_id')
->where('node.lft', 'BETWEEN', array('parent.lft', 'parent.rgt'))
->and_where('catinfo.lang_id', '=', 1)
->group_by('node.category_id')
->having('depth', '<=', 3)
->order_by('node.lft');