-- Database schema
| users : userid [ INTEGER ] primary_key , age [ TEXT ] , u_gender [ TEXT ] , occupation [ TEXT ] | directors : directorid [ INTEGER ] primary_key , d_quality [ INTEGER ] , avg_revenue [ INTEGER ] | actors : actorid [ INTEGER ] primary_key , a_gender [ TEXT ] , a_quality [ INTEGER ] | movies : movieid [ INTEGER ] primary_key , year [ INTEGER ] , isEnglish [ TEXT ] , country [ TEXT ] , runningtime [ INTEGER ] | movies2actors : movieid [ INTEGER ] , actorid [ INTEGER ] , cast_num [ INTEGER ] | movies2directors : movieid [ INTEGER ] , directorid [ INTEGER ] , genre [ TEXT ] | u2base : userid [ INTEGER ] , movieid [ INTEGER ] , rating [ TEXT ] |
-- -- How many directors with average revenue of 4 have made either action or adventure films?

SELECT COUNT(T1.directorid) FROM directors AS T1 INNER JOIN movies2directors AS T2 ON T1.directorid = T2.directorid WHERE T1.avg_revenue = 4 AND (T2.genre = 'Adventure' OR T2.genre = 'Action');