The sentence is correct, but you would normally see it in another form, to determine how many books that the person is certain of being in the room.
"How many books do you know of for certain in my room."
If being certain is not a factor, then you would ask the person to estimate:
"How many books do you think are in my room."