added digit count setter, fixes #24