Can を be used when asking for how many of an object?


First Japanese Stack Exchange question :D

I'm reading a Japanese book and one of the chapter got me thinking.

The book wrote it like this:

[code]

    How many pencils are there ?
    えんぴつはなんぼんですか。
    
[/code]

Can we not not replace は with を ?

Like this:

[code]

    えんぴつ を なんぼんですか
    
[/code]




を denotes a direct object in a sentence. は denotes the subject. Here, えんぴつ is
the subject of the sentence, so it should have a は next to it.




を denotes a direct object in a sentence. は denotes the subject. Here, えんぴつ is
the subject of the sentence, so it should have a は next to it.

