when indexcount is None,set 0