This problem is often called Relational Division
SELECT entity_ID
FROM tableName
WHERE field_tags_ID IN (2,7)
GROUP BY entity_ID
HAVING COUNT(*) = 2
if uniqueness was not enforce on field_tags_ID
for every entity_ID
then a DISTINCT
keyword is needed. otherwise, leave it as is,
SELECT entity_ID
FROM tableName
WHERE field_tags_ID IN (2,7)
GROUP BY entity_ID
HAVING COUNT(DISTINCT field_tags_ID) = 2
UPDATE 1
SELECT COUNT(*) totalCOunt
FROM
(
SELECT entity_ID
FROM tableName
WHERE field_tags_tid IN (2,7)
GROUP BY entity_ID
HAVING COUNT(DISTINCT field_tags_tid) = 2
) s