Add paper bit counting algo

This paper explains the bit counting algorithm used in PR #87.