MYSQL Nested Select From

I have this select working on Firebird Database, but I need to translate it to MySQL. I search the web but didn't find a solution.

SELECT extra, count(extra) AS total 
FROM (SELECT extra FROM items INNER JOIN factors ON items.itemID = factors.zotero_itemID WHERE POSITION(:collectionSort IN collectionSort) <> 0 AND (tagID = :atagID OR tagID = :btagID)) t 
GROUP BY extra