Interesting. I wonder if the empty directories are in a slightly different place. If I substitute a 'T' for the 'C', I noticed one of my systems has 15,000 empty dirs in that place (a lot, but still far less than the 300,000 in the 'C' directory, though.I have none of these directories but still have A LOT of "Service exited due to SIGKILL | sent by mds" log entries in the system log... Every few minutes I get about 10-15 new entries.
Try this command:
ls /private/var/folders/*/*/T/com.apple.metadata.mdworker
Unfortunately, none of this tells us why the mds process is killing the mdworker.shared processes...