Count all elements translated

@return integer
502089
public function countTranslated()
    {
        $callback = function (Translation $v) {
            return $v->hasTranslation() ? $v->getTranslation() : null;
        };

        return \count(\array_filter(\get_object_vars($this), $callback));
    }
1307376
public function filterNotBlankTranslations()
    {
        return $this->getTranslations()->filter(function (TranslationInterface $translation) {
            $content = $translation->getContent();
            return !empty($content);
        });
    }
845559
public function validateTranslations()
    {
        $valid = !empty($this->owner->{$this->translationsAttribute});
        $activeTranslations = 0;
        foreach ($this->owner->{$this->translationsAttribute} as $model) {
            if ($this->isTranslationActive($model)) {
                $activeTranslations++;
                $valid = $valid && $model->validate();
            }
        }
        return $activeTranslations>0 && $valid;
    }
1091010
public function totalChildren(): string
    {
        $total = (int) DB::table('families')
            ->where('f_file', '=', $this->tree->id())
            ->sum('f_numchil');

        return I18N::number($total);
    }
1094316
public function count()
    {
        return count($this->filter($this->menu[$this->getLang()], $this->_where, $this->_with));
    }
1178027
public function check()
    {
        $this->missing = [];
        $from          = $this->getDefaultLocale();
        $locales       = $this->getLocales();
        $ignored       = $this->getIgnoredTranslations();
        $fromTrans     = $this->getTranslations($from, $ignored);

        foreach ($locales as $to) {
            $toTrans = $this->getTranslations($to, $ignored);

            $this->diffMissing($toTrans, $fromTrans, $from);
            $this->diffMissing($fromTrans, $toTrans, $to);
        }

        return $this->missing;
    }
656129
public function getObjectsCount() : int
    {
        return $this->nb_language_list->getSize() +
               $this->nb_role_list->getSize() +
               $this->nb_site_list->getSize()
        ;
    }
1248542
public function filterNotBlankTranslations()
    {
        return array_filter($this->getTranslations()->getArrayCopy(), function (TranslationInterface $translation) {
            $content = $translation->getContent();

            return !empty($content);
        });
    }
440690
public function count() {
		if(!$this->initialized)
			$this->initialize();

		return count($this->elements) - count($this->toRemove) + count($this->toAdd);
	}
778057
protected function count_while_true( $condition ) {
		$count = 0;

		foreach ( $this->elements as $element ) {
			if ( ! $condition($element) ) {
				break;
			}
			$count++;
		}

		return $count;
	}
446494
public function count()
    {
        $ret = $this->conn()->selectCollection($this->table_name)->count($this->where);
        $this->sql = array('table'=> $this->table_name,'where'=>$this->where);

        $this->_clear_var();
        return $ret;
    }
29423
public function translate()
	{
		$arguments = func_get_args();

		// Default translation parameters.
		$translate = array(
			'context' => $this->context(),
			'lang' => $this->lang(),
			'parameters' => $this->parameters(),
			'string' => $this->string(),
		);

		// Populate `$translate` variable with function arguments and/or model state.
		foreach ($this->_translate as $i => $element)
		{
			$this->_setup_element($translate, $element, $i, $arguments);
		}
		// Now that the basic data have been set, parameters that need to have context values.
		foreach ($this->_context_params as $parameter)
		{
			$translate['parameters'][$parameter] = $translate[self::CONTEXT];
		}

		// Translate using the populated data.
		return $this->i18n()
			->translate($translate['string'], $translate['context'], $translate['parameters'], $translate['lang']);
	}
516261
public function count(array $locales = null,  array $filters = null)
    {
        $builder = $this->createQueryBuilder();

        $this->addTransUnitFilters($builder, $filters);
        $this->addTranslationFilter($builder, $locales, $filters);

        $count = $builder->count()
            ->getQuery()
            ->execute();

        return $count;
    }
416300
public function count()
    {
        if(is_null($this->int_count)){
            $this->int_count = mb_strlen($this->value, C::ENCODING);
        }

        return $this->int_count;
    }
1198449
public function countAll()
    {
        $totalDocuments = 0;

        $result = $this->conn->query($this->builderCache);

        if ($result->count()) {
            $totalDocuments = $result->count();
        }

        return $totalDocuments;
    }
827829
public function count(): int
    {
        $this->flags['count'] = true;
        $pdoStatement = $this->provideStatement();
        $pdoStatement = $this->execute($pdoStatement);
        return $pdoStatement->fetchColumn();
    }
691383
public function getTranslations()
    {
        $translations = array_map(function ($file) {
            return $file['content'];
        }, $this->files);

        return Arr::dot($translations);
    }