Counting occurrences of duplicate items in an array
There are a few things that stand out to me immediately in your code. Some good, some are troubling.
Style
First up, your code is neat, and well structured. Indentation is good, and I even appreciate the fact that you have braced 1-liners and got the space right in your expressions.
Traditionally, C puts the open brace on the new line.... I am not a fan of that, but I don't write C very often, so I stick with a style I use in Java. Just thought I would point that out, though.
Sorting
Your sort algorithm is ... basic, but effective. I would agree that it is a problem. As a suggestion, you should use an insertion sort, and do the sort at the same time as the scanf. That way you load the data in an always-sorted way:
puts(&quot;Insert the values:&quot;);
for (i = 0; i &lt; N; i++) {
    int val;
    scanf(&quot;%d&quot;, &amp;val);
    int pos = i;
    while (pos &gt; 0 &amp;&amp; values[pos - 1] &gt; val) {
        values[pos] = values[pos - 1];
        pos--;
    }
    values[pos] = val;
}

The above will do a shifting insertion sort. Just a suggestion.
Duplicates.
This is where there are the most significant problems. I would consider your algorithm to be a real overkill one. You can do it all with no extra data, no duplicates[] array, etc. A simple loop through the data should be fine.
int count = 1;
int previous = values[0] + 1; // something different to the start.
for (int i = 0; i &lt; N; i++) {
    if (values[i] != previous) {
        // something changed... reset the counters
        if (count &gt; 1) {
            // report the count of previous duplicates.
            printf(&quot;Duplicate %d occurs %d times\n&quot;, previous, count);
        }
        previous = values[i];
        count = 0;
    }
    count++;
}
if (count &gt; 1) {
    // catch the last count, if any
    printf(&quot;Duplicate %d occurs %d times\n&quot;, previous, count);
}