protected function countVote($toCount)
    {
        $value = 0;
        foreach ($this->votes as $login => $vote) {
            if ($vote === $toCount) {
                $value++;
            }
        }

        return $value;
    }
protected function countVote($toCount)
    {
        $value = 0;
        foreach ($this->votes as $login => $vote) {
            if ($vote === $toCount) {
                $value++;
            }
        }

        return $value;
    }
protected function countVote ( $ toCount ) { $ value = 0 ; foreach ( $ this -> votes as $ login => $ vote ) { if ( $ vote === $ toCount ) { $ value ++ ; } } return $ value ; }
Count votes of a certain type.

@param string $toCount

@return int
Count votes of a certain type .