How to JOIN a table with itself while using a sub-query?
You use a subselect query as basis for t1 and t2

Like

SELECT 
    t1.TagID AS TagID1, t2.TagID AS TagID2, COUNT(1)
FROM
    (SELECT 
        *
    FROM
        TagMap
    WHERE
        TagID IN (SELECT 
                TagID
            FROM
                Tags
            WHERE
                Articles &gt; 50)) AS t1
        JOIN
    (SELECT 
        *
    FROM
        TagMap
    WHERE
        TagID IN (SELECT 
                TagID
            FROM
                Tags
            WHERE
                Articles &gt; 50)) AS t2 ON t1.ArticleID = t2.ArticleID
        AND t1.TagID &lt;&gt; t2.TagID
GROUP BY t1.TagID , t2.TagID