Four rules, decided by the next letter
Exactly the logic of the letter g: only e / i change the c; everything else (including l / r) keeps it a hard [k].
Each row shows how many examples this page records and how many corpus words match. A word can match two rows (cerveza has both ce and za), so the four counts do not add up. A single word can also contain both readings: in cinco the first c is [θ] and the second is [k]; cerca and quince behave the same way. The rules apply letter by letter, not word by word.
Not e / i — a / o / u, or a consonant such as l / r. The tongue root closes against the soft palate: one normal release.
Before e / i (front vowels) the tongue tip rises to the back of the upper teeth: [θ] in Spain, [s] across most of Latin America.
The u exists only to keep the [k] hard, and is silent: queso is [ˈkeso], not [ˈkweso].
The same [θ] sound must be written z before a / o / u — because ca is [k]. A spelling split, not a second sound.
Why this happens
e / i are front vowels: they pull the tongue tip to the teeth
A [k] needs the tongue root against the soft palate, far back. With e / i the tongue sits forward, the root cannot reach it, and the blade presses up toward the hard palate — air rubs through a narrow gap and comes out as [θ] or [s]. The g turning into [x] is the same story with the friction further back.
One [θ], two spellings, split by the vowel
Peninsular [θ] has two spellings: z + a/o/u (zapato) and c + e/i (cena). Not the other way round — ca is already [k], so [θ] before a has to use z. That is why Spanish has no ze / zi: before e / i that sound is already spelled with c.
qu and gue use the same blocker
Since c changes before e, the [k]+e/i combination needs another spelling: qu (queso). It is exactly the silent u of guerra — a letter that exists only to keep the front vowel away from the consonant.
The consequence: spelling changes to keep the sound
These are the two most common spelling slips in verb conjugation. They look unrelated, but the cause is one: the letter changes before e / i, so it has to be replaced by the spelling that does not change.
c becomes qu
For [k]+e you cannot write ce (that is [θ]/[s]); you write qu — and the u stays silent.
z becomes c
Spanish does not write ze / zi (that sound before e/i is spelled c), so a verb ending in z switches to c when the ending starts with e.
Three places Mandarin speakers slip
Reading ce / ci as a hard [k]
Seeing a c and saying k: cena becomes [ˈkena]. In Spain cena starts exactly like zona, both [θ].
Pronouncing the u in que
queso is [ˈkeso], two syllables; [ˈkweso] adds a w that is not there. Same as the u in guerra: a blocker, nothing more.
Writing ca where [θ]+a is needed
A spelling point: zapato cannot be written capato — ca is [k]. Nor can casa be written zasa. One sound, two spellings, split by the following vowel.
The numbers on this page
Rules: all four are hard orthographic rules of Spanish (c + vowel, qu + vowel, where z may stand, and the c / z split); none needs a measurement.
Examples: 24 words, each recorded on its own (not cut from a sentence), so you hear the word itself.
Corpus count: our corpus has 59 words containing c / q / z, matching the rules as ca/co/cu 39, ce/ci 8, que/qui 1, za/zo/zu 10. Words with ch (such as noche and coche — 12 words in total) are excluded: there the c belongs to [tʃ], not to c + e.
Why que/qui shows only 1: not because it is rare — que is one of the most frequent words in Spanish — but because this corpus is entirely declarative sentences and happens not to use it. That is exactly why these counts explain the separately recorded examples and are not a distribution.