Count deep nested tables
As ypercube pointed out, you want to use COUNT(DISTINCT t.contests_id) here to get the unique count of contests per users. All credit goes to ypercube on this one, but for a readable version of the example query on how to do this:
SELECT u.*, COUNT(DISTINCT t.contests_id) AS contest_total 
FROM users AS u 
LEFT JOIN trials_has_users AS tu 
    ON tu.users_id = u.id 
LEFT JOIN trials AS t 
    ON t.id = tu.trials_id 
WHERE u.id = 1 AND tu.users_id = 1 
GROUP BY u.id;