We present a new procedure to determine the growth function of a homogeneous Garside monoid, with respect to the finite generating set formed by the atoms. In particular, we present a formula for the growth function of each Artin--Tits monoid of spherical type (hence of each braid monoid) with respect to the standard generators, as the inverse of the determinant of a very simple matrix. Using this approach, we show that the exponential growth rates of the Artin--Tits monoids of type \(A_n\) (positive braid monoids) tend to \(3.233636\ldots\) as \(n\) tends to infinity. This number is well-known, as it is the growth rate of the coefficients of the only solution \(x_0(y)=-(1+y+2y^2+4y^3+9y^4+\cdots)\) to the classical partial theta function. We also describe the sequence \(1,1,2,4,9,\ldots\) formed by the coefficients of \(-x_0(y)\), by showing that its \(k\)th term (the coefficient of \(y^k\)) is equal to the number of braids of length \(k\), in the positive braid monoid \(A_{\infty}\) on an infinite number of strands, whose maximal lexicographic representative starts with the first generator \(a_1\). This is an unexpected connection between the partial theta function and the theory of braids.