R data.table lost rows after order
For some reason, your count column is a list.
library(data.table)
df <- structure(list(summary_type = c("0", "1", "2"), count = structure(list(
  62234441L, 5119L, 821770L))), row.names = c(NA, -3L), class = c("data.table", "data.frame"))

df[count]
#Error in `[.data.table`(df, count, ) : 
#  count is not found in calling scope but it is a column of type list.  

Use unlist:
df[order(unlist(count))]

#    summary_type    count
# 1:            1     5119
# 2:            2   821770
# 3:            0 62234441


I have a data.table
> dput(data.summary)
structure(list(summary_type = c("0", "1", "2"), count = structure(list(
    62234441L, 5119L, 821770L), .internal.selfref = <pointer: 0x557538f028c0>)), row.names = c(NA, 
-3L), class = c("data.table", "data.frame"), .internal.selfref = <pointer: 0x557538f028c0>)

data.summary
   summary_type    count
1:            0 62234441
2:            1     5119
3:            2   821770

Its a data.table with 3 row, I want to sort it by count
data.summary[order(count)]

But after this, there are only have 1 row in data.table
data.summary[order(count)]
   summary_type    count
1:            0 62234441

