Add index.count().
Beginnings of declarative interface.