Good point. As I don't know the level of programming knowledge of the asker I need to keep it as simple as possible in the structure of the answer.
Indeed, it is better to make a single query, similar to the one in the selectspec I provided and join to the answers and users table. In fact, you can filter out experts and above in the join itself so you would only be getting in the result IDs of questions that have answers posted by experts+.
You should run that query in the initialize() function and store the result in an array. Then a_count() just checks if the current post being displayed matches the given ID. If it does, then add the qa-a-count-zero CSS class.
In a way, qa-include/plugins/qa-layer-voters-flaggers.php follows a similar mechanism.
Strictly answering your question, I can't be more precise on where to look. If you want to do so, you'll have to write it on your own, as the query you're looking is very ad-hoc, but the selectspec I gave you should be quite close.