You get an aesara shared tensorvariable. They mostly behave the same as regular aesara tensors. To get their length you can use tensor.shape[0]. Keep in mind that Aesara is static, so the result of this will also be an aesara variable that is only eveluated when needed.
You do not want the len(t) you want the length of t_ which will change every time you use set_data and update t_ ("t" in the set_data dict). You should also not use constantdata here because you plan on modifying the data and it’s shape.