protected function calculateTotal()
    {
        $otherConfig = $this->getOtherConfig();
        $total       = $this
            ->getEnvironment()
            ->getDataProvider()
            ->fetchAll($otherConfig->setIdOnly(true));

        if (\is_array($total)) {
            $this->intTotal = $total ? \count($total) : 0;

            return;
        }

        if (\is_object($total)) {
            $this->intTotal = $total->length();

            return;
        }

        $this->intTotal = 0;
    }