boto/boto — pull request #1181 by disruptek (2012-12-12 06:41:02+00:00)
Title: Query/Scan Count/ScannedCount support and TableGenerator improvements

Count/ScannedCount support for dynamodb.layer2.(scan|query)
add count argument to dynamodb.layer1.query()
fix consumed_units to match Amazon return value (float)
add value to get/set remaining generator iterations
add ability to jump ahead in result set pagination
add ability to query for meta-data values before iterating

This PR will need some testing as it may change the behavior of a few of subtle corner-cases that it tries to solve properly. A couple strange cases where it might break existing code:
- access of the undocumented max_results value in the table generator
- expectation of consumed_units to be an int, which it was (only) prior to iteration

An additional subtlety is that due to the way DynamoDB implements Count and ScannedCount, one needs to perform the usual result pagination iteration until the table has been fully scanned/queried. We leave this to the user for all the usual reasons, but it will likely trip up anyone who skips the documentation.