fixed dt.count call