Not a fundamental speed-up but at least something :)
find . -printf \\n | wc -l
You really do not need to pass the list of file names, just the newlines suffice. This variant is about 15 % faster on my Ubuntu 12.04.3 when the directories are cached in RAM. In addition this variant will work correctly with file names containing newlines.
Interestingly this variant seems to be a little bit slower than the one above:
find . -printf x | wc -c
Special case - but really fast
If the directory is on its own file system you can simply count the inodes:
df -i .
If the number of directories and files in other directories than the counted one do not change much you can simply subtract this known number from the current
df -i result. This way you will be able to count the files and directories very quickly.