Improved integer partition counting algorithm