From the arithmetic conundrums of the Atharvaveda and the numerical fascination of the epics to the grammatical tables of Pāṇini and the numbering of sexual positions by Vātsāyana, there is a remarkable obsession in ancient India with enumeration and calculation.