An apartment complex rents one bedroom apartments for $400 per month, two-bedroom apartments for $600 per month, and three bedroom apartments for $1000 per month. In february 2004, a total of 40 apartments were rented producing a revenue of $24,800. The number of 3 bedroom apartments rented was 12 less than the number of two bedroom apartments rented. How many two bedroom apartments were rented?