You need to perform a PIVOT. In other databases, such as SQL Server, it is easier to do this. In MySQL you need to create aggregate expressions, such as the one I created in Sql Fiddle, , take a look around there.
Basically, for the data universe below:
CREATE TABLE Turnos ('id' int, 'turno' int);
INSERT INTO Turnos ('id', 'turno')
VALUES
(1, 1),
(1, 1),
(1, 1),
(1, 2),
(1, 3),
(1, 5),
(1, 5),
(1, 6),
(1, 6),
(1, 7),
(1, 9),
(1, 9),
(1, 9)
;
We made the query as follows:
SELECT
SUM(CASE turno WHEN 1 THEN 1 ELSE 0 END) AS '1',
SUM(CASE turno WHEN 2 THEN 1 ELSE 0 END) AS '2',
SUM(CASE turno WHEN 3 THEN 1 ELSE 0 END) AS '3',
SUM(CASE turno WHEN 4 THEN 1 ELSE 0 END) AS '4',
SUM(CASE turno WHEN 5 THEN 1 ELSE 0 END) AS '5',
SUM(CASE turno WHEN 6 THEN 1 ELSE 0 END) AS '6',
SUM(CASE turno WHEN 7 THEN 1 ELSE 0 END) AS '7',
SUM(CASE turno WHEN 8 THEN 1 ELSE 0 END) AS '8',
SUM(CASE turno WHEN 9 THEN 1 ELSE 0 END) AS '9'
FROM Turnos
Reaching the desired result.