Try this:
SELECT *
FROM Table1 t1
INNER JOIN (SELECT ID
,COUNT(*) numCount
FROM Table2 t2
WHERE t2.OtherId = @otherID
GROUP BY ID) t3
ON t1.ID = t3.ID
WHERE t1.Key = @Key
AND t3.numCount < t1.NumberInUse