select count(*)
from results r join creations c on (r.resultid = c.creation) 
where r.pendingforclaim = false