-- Database schema
| Demog : GEOID [ INTEGER ] primary_key , INHABITANTS_K [ REAL ] , INCOME_K [ REAL ] , A_VAR1 [ REAL ] , A_VAR2 [ REAL ] , A_VAR3 [ REAL ] , A_VAR4 [ REAL ] , A_VAR5 [ REAL ] , A_VAR6 [ REAL ] , A_VAR7 [ REAL ] , A_VAR8 [ REAL ] , A_VAR9 [ REAL ] , A_VAR10 [ REAL ] , A_VAR11 [ REAL ] , A_VAR12 [ REAL ] , A_VAR13 [ REAL ] , A_VAR14 [ REAL ] , A_VAR15 [ REAL ] , A_VAR16 [ REAL ] , A_VAR17 [ REAL ] , A_VAR18 [ REAL ] | mailings3 : REFID [ INTEGER ] primary_key , REF_DATE [ DATETIME ] , RESPONSE [ TEXT ] | Customers : ID [ INTEGER ] primary_key , SEX [ TEXT ] , MARITAL_STATUS [ TEXT ] , GEOID [ INTEGER ] , EDUCATIONNUM [ INTEGER ] , OCCUPATION [ TEXT ] , age [ INTEGER ] | Mailings1_2 : REFID [ INTEGER ] primary_key , REF_DATE [ DATETIME ] , RESPONSE [ TEXT ] | Sales : EVENTID [ INTEGER ] primary_key , REFID [ INTEGER ] , EVENT_DATE [ DATETIME ] , AMOUNT [ REAL ] |
-- -- In female customers ages from 50 to 60, how many of them has an number of inhabitants ranges from 19 to 24?

SELECT COUNT(T1.ID) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.SEX = 'Female' AND T1.age >= 50 AND T1.age <= 60 AND T2.INHABITANTS_K >= 19 AND T2.INHABITANTS_K <= 24;