Nasty title. Never the less, the first hurdle is done. Time to wrap up the code. You can see this working on any post within this website. For example this one - you should notice the "Similar content" block. Links are ordered by number of 'my' tags present. As simple as that.
I had a silly problem. mysql 4.0 doesn't support sub-selects, the way my original implementation was coded. Silly, because I spent hours debugging this, without even thinking to check the version.
end result: mysql 1 - vlado 1
I have my test cases for relations now. So things should be out in the wild soon