JS: filtering trainee results to before on the count