Commiting counting and indexing