Below is the list of tables from the database along with their columns and datatype. Need to generate an accurate SQL query for the question.
Only use the columns present in the respective table. Only use the columns which are required to generate the SQL query. Only use table joins if required and not otherwise.

### Tables ###
TABLE: CREATE TABLE table_8666 ( "Province" text, "Capital" text, "Population at 2010 Census" real, "Area (km\u00b2)" real, "Density (2010)" real, "Geographical unit" text, "Number of Cities (kota)" real, "Number of Regencies (kabupaten)" real, "Number of Districts (kecamatan)" real, "Villages" real )

### Question ###
What is the sum of the number of districts (kecamatan) in the geographical unit of java with more than 4 recencies (kabupaten) and less than 8,577 villages?

### Accurate SQL ###

SELECT SUM("Number of Districts (kecamatan)") FROM table_8666 WHERE "Geographical unit" = 'java' AND "Number of Regencies (kabupaten)" > '4' AND "Villages" < '8,577'