Text this: On the number of vertices of each rank in phylogenetic trees and their generalizations