A Shelbyville high school math teacher now faces 40 felony counts after an undercover child exploitation investigation.