Fix get_index_forest bug, clean out counts.py