Unfortunately (in our case) the pageviews API does not record pageviews of the target article of a redirect, only the redirect itself. For some pages there may be popular redirects such as pseudonyms, common grammatical errors, etc. (example), so we might want to account for those pageviews.
We could query the prop=redirects API to get a list, and incorporate those pages as part of the data for a single page. The limit without authentication is 500 results, but I doubt there are many pages with more than 500 redirects.
Originally reported at T156857#3091447