The only touchdowns considered to be special teams touchdowns are on plays where the ball is actually kicked or punted (these include: kickoff returns, punt returns, returns of a fumbled kick return, returns of a fumbled punt return, blocked field goal returns, or blocked punt returns).
A fake field goal or fake punt which results in a touchdown by the team that snapped the ball is an offensive touchdown.