public static function extractPluralCount($expr)
    {
        $parts = explode(';', $expr, 2);
        $nplurals = explode('=', trim($parts[0]), 2);
        if (strtolower(rtrim($nplurals[0])) != 'nplurals') {
            return 1;
        }
        if (count($nplurals) == 1) {
            return 1;
        }

        return intval($nplurals[1]);
    }