say your second table looks like this ....
id u_id
1 1
2 1
3 1
4 2
5 1
6 3
7 3
8 3
9 3
10 3
11 4
12 2
13 4
you can get the u_id and the number of posts like this
SELECT u_id, count( u_id ) AS Number_of_Posts
FROM DATA GROUP BY u_id
ORDER BY Number_of_Posts DESC
which will give you this
u_id Number_of_Posts
3 5
1 4
2 2
4 2
then you can use a join or another query to get the names. You can also use limit on the query to get you the top 5 or 3 or whatever number you need