Write SQL query to solve given problem: Among the employees who work as a Trainee, how many of them have a salary of over &20,000 a year?. Keep the solution inside sql tag ```sql [SQL-Query] ```
SELECT COUNT(*) FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL) > 20000 AND T2.positiontitle = 'Trainee'