echo 'скачано ' . rand(100, 200) . ' раз';
$nums = ['2', '3', '4'];
$count = rand(100, 200);
$a_num = mb_substr($count, -1, 1);
$b_num = mb_substr($count, -2, 1);
$str = 'раз';
if (in_array($a_num, $nums) && $b_num != '1') $str .= 'а';
echo "скачано $count $str";