In a nutshell, the issue arises from the definition of number of as a second-order concept (i.e. a numerical quantifier) in Die Grundlagen der Arithmetik (1884).
Consider e.g. 0xϕ(x)=df Card[xy] (y ≠ y) [ϕx], that reads:
To assert 0xϕ(x) is to say that the objects that are ϕ are in one-to-one correlation with the objects that are not self-identical,
i.e. there are no objects that are ϕ.
Here we have defined the "second-order" concept (a predicate 0x(ξ) of a first-order predicate ϕ(x)). But we have not defined what is the number 0.
With that definition, how can we answer the question :
"A sentence of the form ‘The number of F's = q’ is false when q is not a number"
(where the paradigmatic example is with Julius Caesar in place of the "name" q) ?
In the "logically perfect" language considered by Frege, every singular term ("name") must have a denotation (Beduetung) and every function must be defined for every possible argument (every concept must be "sharply defined").
For instance, if ‘q’ is a singular term, its semantic interpretation must fix the truth-conditions of ‘q = y’ for any given object y.
In the case of Frege’s attempt to define the cardinal numbers, the problem is that the provided criterion for being the number belonging to the concept ϕ does not determine the Bedeutung of the number words completely, and thus it does not justify the definite article ‘the’.
The "mature" Fregean solution in Grundgesetze der Arithmetik (1893/1903) is based on the introduction of value-courses (Wertverläufe):
The Bedeutung of the singular term ‘ε´ φ(ε)’ is the value-course of the
which rules out that a sentence of the form ‘ε´ ϕ(ε) = q’ is true when q is not a value-course.
It is highly debate in the literature whether the value-course theory really solves the julius Caesar problem.