human
Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. 
###Database Schema: Rank, County, Population (1960), Population (2000), Population (2040)
###Question: What was the population of a county in 2040 that had a population less than 108,172 in 2000 and less than 107,589 in 1960?
gpt
SELECT COUNT Population (2040) FROM table WHERE Population (1960) < 108,172 AND Population (2000) < 107,589