item count is sum of quantity field rather than count of rows

Fixes issue #646