// ScanCount counts all records matching the scan query
ScanCount counts all records matching the scan query
// ScanCount counts all records matching the scan query
func (c *Client) ScanCount(ctx context.Context, input *dynamodb.ScanInput) (int64, error) {
	i := *input
	i.Select = aws.String(dynamodb.SelectCount)
	var total int64
	c.ScanIterator(ctx, &i, func(output *dynamodb.ScanOutput) error {
		if output.Count == nil {
			return errors.New("count nil")
		}
		atomic.AddInt64(&total, *output.Count)
		return nil
	})
	return total, nil
}
func ( c * Client ) ScanCount ( ctx context . Context , input * dynamodb . ScanInput ) ( int64 , error ) { i := * input i . Select = aws . String ( dynamodb . SelectCount ) var total int64 c . ScanIterator ( ctx , & i , func ( output * dynamodb . ScanOutput ) error { if output . Count == nil { return errors . New ( " " ) } atomic . AddInt64 ( & total , * output . Count ) return nil } ) return total , nil }
ScanCount counts all records matching the scan query
ScanCount counts all records matching the scan query