src/Leevel/Database/Ddd/Repository.php
public function findCount($condition = null, string $field = '*'): int
    {
        $select = $this->entity->selfDatabaseSelect();

        if ($condition) {
            $this->normalizeCondition($condition, $select);
        }

        return $select->findCount($field);
    }
public function findCount($condition = null, string $field = '*'): int
    {
        $select = $this->entity->selfDatabaseSelect();

        if ($condition) {
            $this->normalizeCondition($condition, $select);
        }

        return $select->findCount($field);
    }
取得记录数量.

@param null|array|\Closure|\Leevel\Database\Ddd\ISpecification|string $condition
@param string                                                         $field

@return int