added command-line version (see notes in README)
Merge https://github.com/MWSchmid/Rcount