Fix countDigits test.
Add Bag.