Send 'length' command line option as 'count' to API

fixed #251
Merge pull request #252 from ehershey/patch-1

Send 'length' command line option as 'count' to API