What is the maximum number of solutions a quartic function can have?

I assume you mean a polynomial of degree 4. In general, a polynomial of degree "n" can be separated into "n" linear factors. As a result, a polynomial of degree "n" has exactly "n" solutions - unless two or more of the factors are repeated; in which case the corresponding solution is said to be a multiple solution.

As an example:

(x - 2)(x - 5) = 0

has two solutions, namely 2 and 5; while

(x - 3)(x - 3)(x + 5) = 0

is of degree three, but has only two solutions, since the solution "3" is repeated.

An equation such as

x2 + 1 = 0

cannot be factored in the real numbers, so if you insist that the solutions be real, there are zero solutions. However, the polynomial can be factored in the complex numbers; in this case:

(x + i)(x - i) = 0,

resulting in the two complex solutions, -i and +i.