Postgres select using lateral
Well product_tree_length is a table alias, not a column alias. So if you use that alias in the SELECT list, obviously you get a record. 

You have two options to properly define an alias for the column

Solution one: use a column alias inside the derived table:

select t.page
       product_tree_length.len,
       count(*)
from "Table" t
  cross join lateral (
     SELECT length(....) as len
  ) AS product_tree_length
...


Solution two: define a column alias as part of the table alias:

select t.page
       product_tree_length.len,
       count(*)
from "Table" t
  cross join lateral (
     SELECT length(....)
  ) AS product_tree_length(len)
...