## Scala, 97 characters ##
    object O{def f(i:Int):Int=if(i>0)i%2+f(i/2)else 0
    def main(a:Array[String])=print(f(a(0).toInt))}

Usage: `scala O 56432`