In case anyone is wondering (because I was and had to look it up): Swahili numbers do take noun agreements except for 6, 7, 9 and 10
The sentence is referring to an object, object being teacher hence it should be 'The teacher needs.....
I am not sure why Duolingo faulted : "The teacher needs 6 books", What is wrong with using "the" in this context?