Try looking at Inner join and count()
ribrahim commented: Thank you for the link +0
happygeek commented: Tell your friends :) +13
jkon commented: It says that I answered that one but you did. +1 because you answered the questions (although the error was in the use of this external class) +8
ronjacob012 commented: will help you as soon as possible +0
pritaeas commented: Thanks for sharing +13