public function getCount($ignoreUnapprovedVersions = false)
    {
        $app = Application::getFacadeApplication();
        $db = $app->make(Connection::class);
        $now = $app->make('date')->getOverridableNow();
        if ($ignoreUnapprovedVersions) {
            $count = $db->GetOne(<<<'EOT'
SELECT
    count(btID)
FROM
    Blocks b
    INNER JOIN CollectionVersionBlocks cvb
        ON b.bID=cvb.bID
    INNER JOIN CollectionVersions cv
        ON cvb.cID=cv.cID AND cvb.cvID=cv.cvID AND cv.cvIsApproved=1 AND (cv.cvPublishDate IS NULL OR cv.cvPublishDate <= ?) AND (cv.cvPublishEndDate IS NULL OR cv.cvPublishEndDate >= ?)
WHERE
    b.btID = ?
EOT
                ,
                [$now, $now, $this->btID]
            );
        } else {
            $count = $db->GetOne("SELECT count(btID) FROM Blocks WHERE btID = ?", array($this->btID));
        }

        return $count;
    }