That’s probably it:
“The GNU implementation of uniq as found on Ubuntu, with -c, doesn't report counts of contiguous identical lines but counts of contiguous lines that sort the same.”
https://unix.stackexchange.com/questions/469347/using-uniq-on-unicode-text