public function countRemoteHistoryContaos(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
    {
        $partial = $this->collRemoteHistoryContaosPartial && !$this->isNew();
        if (null === $this->collRemoteHistoryContaos || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collRemoteHistoryContaos) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getRemoteHistoryContaos());
            }
            $query = RemoteHistoryContaoQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterByRemoteApp($this)
                ->count($con);
        }

        return count($this->collRemoteHistoryContaos);
    }