init: return the number of initializations
Merge pull request #2743 from ethomson/init_val

init: return the number of initializations