abstracted out the indice count.