Fixed wrong count esp. on joins <Problem see http://stackoverflow.com/q/18309899/2023334>