Let $p$ be a prime.  It is given that there exists a unique nonconstant function $\chi:\{1,2,\ldots, p-1\}\to\{-1,1\}$ such that $\chi(1) = 1$ and $\chi(mn) = \chi(m)\chi(n)$ for all $m, n \not\equiv 0 \pmod p$ (here the product $mn$ is taken mod $p$). For how many positive primes $p$ less than $100$ is it true that \[\sum_{a=1}^{p-1}a^{\chi(a)}\equiv 0\pmod p?\] Here as usual $a^{-1}$ denotes multiplicative inverse.

[i]Proposed by David Altizio[/i]
1. **Understanding the function $\chi$**:
   - The function $\chi$ is a Dirichlet character modulo $p$, specifically the Legendre symbol $\left(\frac{a}{p}\right)$.
   - $\chi(a) = 1$ if $a$ is a quadratic residue modulo $p$.
   - $\chi(a) = -1$ if $a$ is a non-quadratic residue modulo $p$.
   - $\chi(1) = 1$ because $1$ is always a quadratic residue.

2. **Sum of $a^{\chi(a)}$**:
   - We need to evaluate the sum $\sum_{a=1}^{p-1} a^{\chi(a)} \pmod{p}$.
   - Split the sum into quadratic residues (QR) and non-quadratic residues (NQR).

3. **Properties of QR and NQR**:
   - There are $(p-1)/2$ quadratic residues and $(p-1)/2$ non-quadratic residues modulo $p$.
   - The set of quadratic residues is closed under multiplication.
   - The set of non-quadratic residues is also closed under multiplication.

4. **Sum of quadratic residues and non-quadratic residues**:
   - Let $S_{\text{QR}} = \sum_{a \text{ is QR}} a$ and $S_{\text{NQR}} = \sum_{a \text{ is NQR}} a$.
   - The total sum of all residues modulo $p$ is $S_{\text{QR}} + S_{\text{NQR}} = \sum_{a=1}^{p-1} a = \frac{(p-1)p}{2}$.

5. **Sum of $a^{\chi(a)}$**:
   - $\sum_{a=1}^{p-1} a^{\chi(a)} = \sum_{a \text{ is QR}} a^1 + \sum_{a \text{ is NQR}} a^{-1}$.
   - Since $a^{-1}$ for $a$ being NQR is also a NQR, $\sum_{a \text{ is NQR}} a^{-1} = S_{\text{NQR}}$.

6. **Combining the sums**:
   - $\sum_{a=1}^{p-1} a^{\chi(a)} = S_{\text{QR}} + S_{\text{NQR}}$.
   - We know $S_{\text{QR}} + S_{\text{NQR}} = \frac{(p-1)p}{2}$.

7. **Condition for the sum to be zero modulo $p$**:
   - $\frac{(p-1)p}{2} \equiv 0 \pmod{p}$.
   - This simplifies to $\frac{p-1}{2} \equiv 0 \pmod{p}$.
   - Since $p$ is a prime, $\frac{p-1}{2}$ is an integer, and it is zero modulo $p$ if and only if $p-1$ is divisible by $2$.

8. **Counting the primes**:
   - We need to count the odd primes less than $100$.
   - The odd primes less than $100$ are: $3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97$.
   - There are $24$ such primes.

The final answer is $\boxed{24}$.