Use scope for count.
Add specs for source image joins.