Edited old function printIndex, now points to CountFiles