Introduction. In this paper we consider some problems in topological dynamics with the intention of computing the complexity of the flows on compact metric spaces. In [Fu], Furstenberg gave an inductive structural analysis of metric flows as the least class containing the trivial flow and closed under extensions. This was extended by Ellis and others to flows on arbitrary compact Hausdorf spaces (with the notion of equicontinuous extension replacing isometric extension). Veech asked which ordinals arise in this inductive characterization ([VI]). The first theorem we show is that the collection of ordinal ranks of metric flows are exactly the countable ordinals. The examples we provide are various generic flows on the infinite dimensional torus. Using well-known Banach space techniques, we then show that the ranks of flows on arbitrary compact Hausdorf spaces are the countable ordinals, plus one more, the least uncountable ordinal. The next question we turn to is whether the flows form a Borel set. To make this question precise, we must consider the flows as points in a separable metric space. (For example we can consider the generator of a 2-flow as a compact subset of the square of the Hilbert cube.) We discuss several ways of doing this and show that they are all equivalent up to Borel reductions. We then show that the collection of Distal flows is a complete co-analytic set; hence it is not a Borel set. (A complete co-analytic set is a co-analytic set to which every other co-analytic set is reducible via a Borel function.) We then turn to the collection of distal functions, a generalization of the class of almost periodic functions. Veech [V2], asked whether the collection of functions (e.g. on 2) is a Borel set (or even a measurable set). We show that the functions are not a Borel set, but are co-analytic and hence universally measurable.