fix len(filter(...)) and move boto.compat import as suggested