counting bits with functional programming easy and fun!