Write SQL query to solve given problem: How many courses were taught by a professor who is currently the member of faculty?. Keep the solution inside sql tag ```sql [SQL-Query] ```
SELECT COUNT(*) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1 AND T1.hasPosition <> 0