def file_upload_getlist_count(request):
 file_counts = {}
 for key in request.FILES.keys():
  file_counts[key] = len(request.FILES.getlist(key))
 return HttpResponse(simplejson.dumps(file_counts))

def file_upload_getlist_count ( request ) : file_counts = { } for key in request . FILES . keys ( ) : file_counts [ key ] = len ( request . FILES . getlist ( key ) ) return HttpResponse ( simplejson . dumps ( file_counts ) )
check the .