SELECT count( id ) AS 3 FROM portal_topics WHERE forum=1
SELECT count( id ) AS 3 FROM portal_topics WHERE forum=2
...
SELECT count( id ) AS 3 FROM portal_topics WHERE forum=999
z tym że chce to osiągnąć w jednym zapytaniu
ogólnie ma być liczba powtórzeń wartości w kolumnie forum, czyli jeśli mam kolejno takie wartości
1,1,1,1,2,2,3,3,3
to chce otrzymać
------------
| 1 | 2 | 3 |
------------
| 4 | 2 | 3 |
------------