Merge remote branch 'cloudant:3102-fix-number-of-elements'

This closes #2

Signed-off-by: ILYA Khlopotov <iilyak@ca.ibm.com>