<<
1 extra line. "." and ".." are files. 
>>
Well, yea ... everything is a file in unix

.
I assumed he didn't want to count those two, but I could be wrong.
Another thing ... if you only want to count
files which are
not also directories, you can do this:
ls -1ap | grep -v $'/' | wc -l
You should be able to achieve the same thing with the -I option to ls, but I couldn't get it to work !?!