Yes, you can still count the tuition for a class even if you failed it.
Your college should send you a 1098-T form with the applicable tuition and fee amounts, which should include the failed course. TurboTax will guide you through the steps for inputting the 1098-T info.
More information on education tax credits can be found here:
Education
Tax Credits