In 2013, Gau and Wu introduced a unitary invariant, denoted by $k(A)$, of an $ntimes n$ matrix $A$, which counts the maximal number of orthonormal vectors $textbf x_j$ such that the scalar products $langle Atextbf x_j,textbf x_jrangle$ lie on the boundary of the numerical range $W(A)$. We refer to $k(A)$ as the Gau--Wu number of the matrix $A$. In this paper we take an algebraic geometric approach and consider the effect of the singularities of the base curve, whose dual is the boundary generating curve, to classify $k(A)$. This continues the work of Wang and Wu classifying the Gau-Wu numbers for $3times 3$ matrices. Our focus on singularities is inspired by Chien and Nakazato, who classified $W(A)$ for $4times 4$ unitarily irreducible $A$ with irreducible base curve according to singularities of that curve. When $A$ is a unitarily irreducible $ntimes n$ matrix, we give necessary conditions for $k(A) = 2$, characterize $k(A) = n$, and apply these results to the case of unitarily irreducible $4times 4$ matrices. However, we show that knowledge of the singularities is not sufficient to determine $k(A)$ by giving examples of unitarily irreducible matrices whose base curves have the same types of singularities but different $k(A)$. In addition, we extend Chien and Nakazatos classification to consider unitarily irreducible $A$ with reducible base curve and show that we can find corresponding matrices with identical base curve but different $k(A)$. Finally, we use the recently-proved Lax Conjecture to give a new proof of a theorem of Helton and Spitkovsky, generalizing their result in the process.