SELECT  COUNT(*) AS amount
FROM    one i
JOIN    two io ON io.id = i.id