SELECT COUNT(*)
FROM xf_thread AS thread
LEFT JOIN xf_thread_rpg AS threadRpg ON (thread.thread_id = threadRpg.thread_id)
WHERE (thread.node_id = 10033) AND (thread.prefix_id = 66) AND (thread.sticky = 0) AND (thread.discussion_state IN ('visible'))