only count head or work nodes in get_all_nodes