Former shepherds, to control their flocks of sheep, associated them with stones that they kept in bags. Each sheep corresponded to a pebble. At the beginning and end of the day, they made the appropriate correspondences. If stone was left, sheep was missing. As a little stone in Latin means "Calculus", hence the word calculus.