Denote by si=a1+a2+⋯+ai, ti=1+2+⋯+i. We will show that there exists at most one i≥1011, for which si=ti is divisible by ti. Indeed, note that si≤2022+2021+⋯+(2023−i)=2023i−1011. Also, for i≥1011 we have 2023i−1011<3ti, as 4ti=2i(i+1)≥2024i, so if for i≥1011 ti is an integer larger than 1, then si=2ti.
Suppose that there exist two such i>j≥1011, that si=2ti,sj=2tj, then si−sj=2(ti−tj)=i2+j2−i−j=(i−j)(i+j+1)≥2023(i−j), but si−sj=aj+1+aj+2+⋯+ai≤2022(i−j), contradiction. So, there can't be more than 1011.
Let it be i. It's enough to note that for a permutation (2,4,…,2022,1,3,…,2021) the number of such i is precisely 1011, as for i=1,…,1011 we have si=2+4+⋯+2i=2ti.