MDL-42318 coursecat: show correct courses count

courses count should exclude courses that are not visible to the current user