The riddle
What Has Ears but Cannot Hear?
Two words spelled alike
Dictionaries give the ear on a head and the ear on a corn plant separate entries with separate histories. Online Etymology Dictionary lists the hearing organ as coming from one old word and the spike of a cereal plant from another, and English later spelled both the same way. The riddle slips through that coincidence. On a corn plant, the ear is the part that carries the kernels, and the husk is the leafy wrapping around it.
What is on the cob
Kernels grow in lengthwise rows, and the number of rows on an ear is usually even, as Iowa State University Extension explains. University of Illinois Extension describes a typical ear as about 16 rows with roughly 50 kernels in each, which makes 800 kernels in all. Real ears vary, so those figures describe a typical ear and not a rule. The tidy pattern makes an ear a good thing to count if a real one is on hand.
A field instead of a plant
A few collections give a cornfield as the answer, reasoning that a whole field holds many ears. Corn fits better. The riddle never mentions a field, and a single plant already has the pun built into it. A listener who starts with animals can be nudged with "think of something that grows", and the answer usually follows within a few seconds.
Trying it at a farm stand
This riddle is easiest to enjoy with the answer in view. Hold up an ear still in its husk, ask the question, and let the listener look at the object before guessing. The joke needs no explanation once the ear is in hand.