MySQL "Out of sort memory" error on a simple GROUP_CONCAT query
It looks like your name column concatenates two items.  Try building the table with the column split. 

CREATE TABLE `permissions` (
  `id` INTEGER(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `object` VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `permission` VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  UNIQUE KEY `object_permission` (`object`, `permission`)
d
)ENGINE=InnoDB
AUTO_INCREMENT=11 CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci';

INSERT INTO `permissions` (`id`, `name`) VALUES
  (1,'ocjena_dobavljaca','view'),
  (2,'ocjena_dobavljaca','edit'),
  (3,'ocjena_dobavljaca','delete'),
  (4,'zaposlenici','view'),
  (5,'zaposlenici','edit'),
  (6,'zaposlenici','delete'),
  (7,'vatrogasni_aparati','view'),
  (8,'vatrogasni_aparati','edit'),
  (9,'vatrogasni_aparati','delete'),
  (10,'organizacijska_shema_drustva','');
COMMIT;

SELECT 
    object, 
    COUNT(*) as num,
    GROUP_CONCAT(permission)as nn
FROM permissions
GROUP BY object;