I think the problem is that vert in the above query is a vertex object, but it is expected to be a vertex _id (or vertex _key). This is the reason why the exception occurs.
The first query can be modified as follows:
db._createStatement({query: 'FOR vert IN imdb_vertices FILTER vert.type == "Person" LET edge_count = (LENGTH(NEIGHBORS(imdb_vertices, imdb_edges, vert._id, "outbound", [{"type": "Role", "$label": "ACTS_IN"}]))) SORT edge_count DESC LIMIT 10 RETURN {"name": vert.name, "count": edge_count}'}).execute().toArray()