Added beginCountRelation to TQuery

Signed-off-by: Tom Wright <tom@inflatablecookie.com>