Fix the count with multiple joins.
Finish 1.0.3