Usually, these types of programs don't count because of the school not being an eligible educational institution. That said, you can check out this link to the US Department of Education Database of Accredited Schools to see if your school is listed there. If it’s there, you are good to go, according to the IRS.
An eligible educational institution is any college, university, vocational school, or post-secondary educational institution eligible to participate in a student aid program administered by the US Department of Education. Virtually all accredited public non-profit, proprietary (privately-owned profit-making) post- secondary institutions.
Here is a link with more information about Education Tax Benefits that you may want to read:
Also, if the school does qualify it would be for the Lifetime Learning Credit (tuition and fees deduction).
What is the tuition and fees deduction?
Penn Foster IS listed on the Database of Accredited Postsecondary Institutions and Programs. Their
No, Penn Foster is not eligible for claiming federal education tax credits
"Q. Can I claim Penn Foster on my taxes?
A. No, students shouldn’t claim their Penn Foster tuition payments on their federal or state tax returns. Because we do not participate in the United States Department of Education student aid programs, we are not an eligible institution for students to claim or qualify for various tax credits. With this in mind, we do not send students or graduates 1098 forms or any other paperwork needed for filing your yearly return."