Function To Count Number Of Index In List