Selecting entries with the same count as in another table I'm using a SELECT statement to select multiple IDs and than use

GROUP BY ID
HAVING COUNT(*) = someNumber


to only have the IDs with a certain count.

What I however actually want to do is to select all those IDs that have the same count that they have in another table.
I tried some variations of the following but couldn't get my desired result.

GROUP BY ID
HAVING COUNT(*) = (SELECT COUNT(entryName_ID) FROM entryNames)


Is it even possible to do what I want? And if so how?
If I understand your requirement correctly, You can try something like this.

This will get count per ID from table1 and table2 and then return only those records where T1.ID count matches the second table

SELECT T1.ID FROM
(
    SELECT ID,Count(*) c 
    From Table1 GROUP BY ID
) T1
INNER JOIN 
(
     SELECT ID,Count(*) c 
     From Table2 GROUP BY ID
) T2
ON T1.ID = T2.ID AND T1.c = T2.c