protected function getSearchCount($search, array $array)
    {
        $search = $this->getPregQuote($search);

        $number = 0;
        foreach ($array as $value) {
            if (preg_match('/^'.$search.'/', $value)) {
                $number++;
            }
        }

        return $number;
    }