Frege's course-of-value of a function (or concept) is something very akin to the extension of a concept : the collection of objects satisfying the concept.
And see Frege's definition of number :
Frege argues that numbers are objects and assert something about a concept. Frege defines numbers as extensions of concepts. 'The number of $F$'s' is defined as the extension of the concept $G$ is a concept that is equinumerous to $F$. The concept in question leads to an equivalence class of all concepts that have the number of $F$ (including $F$). Frege defines $0$ as the extension of the concept being non self-identical. So, the number of this concept is the extension of the concept of all concepts that have no objects falling under them. The number $1$ is the extension of being identical with $0$.
Thus, starting from the condition : $¬∃xFx$, expressing the fact that nothing falls under $F$ (in modern notation : the extension of $F$ is the empty set) he defines the number $0$.
In order to achieve this, Frege uses the machiney if course-of-values and related axiom (see Basic Law V).
For details, see Frege's Theorem and Foundations for Arithmetic.