mid-14c., "table where a money lender does business," from Old French contouer, comptoir "counting room; table or bench of a merchant or bank" (14c.), from Medieval Latin computatorium "place of accounts," from Latin computatus, past participle of computare "to count, sum up, reckon together" (see compute).
Generalized 19c. from banks to shops, then extended to display cases for goods. In reference to a similar construction in a home kitchen by 1875. Over-the-counter in reference to goods sold and money paid is by 1875; phrase under the counter in reference to illegal or clandestine transactions is by 1926.