In my experience, the number of courses I get back from the public courses index is typically much smaller than the results I get back from the accounts API, though it's possible my school's Canvas instance is set up differently from yours, so your mileage may vary.
If I remember correctly, the GET /api/v1/accounts/:account_id/courses endpoint needs an extra parameter to return inactive courses. Glancing at the documentation, the state[] parameter should be what you're looking for. For instance, doing a GET /api/v1/accounts/self/courses?state[]=all call should return everything, including deleted and unpublished courses, but it's possible I could be missing something.
It's also possible that Canvas's pagination could be tripping things up. Even if you set the per_page parameter absurdly high, Canvas will still limit the maximum number of returned records to 100.
Either way, I hope you're able to get your API call working.