Your initial attempt was close. You were simply using the wrong key inside the loop:
$newArr = array();
foreach ($details['user_groups'] as $key => $value) {
// What you were using:
// $newArr[$value['user_groups']]++;
// What you should be using:
$newArr[$value['group']]++;
}