I've tried the following to get the len/content\_length of the `s3.Bucket.objectsCollection` in boto3 v1.7.37:

```
import boto3    
s3 = boto3.resource('s3')
bucket = s3.Bucket('myBucket')
bucketObjects = bucket.objects.filter(Prefix='myPrefix')
if (len(bucketObjects) > 0):
     do_something()
else:
     do_something_else()

```

Unfortunately this gives me the following error:

```
TypeError: object of type 's3.Bucket.objectsCollection' has no len()

```

I've also tried this with `bucketobjects.content_length` and got

```
AttributeError: 's3.Bucket.objectsCollection' object has no attribute 'content_length'

```

Am I going to have to iterate through the list and count the objects or is there a better way?