PHP, 89 84 bytes
foreach(count_chars($argv[2])as$a)$b+=[2=>1,3,7.77][$a];echo$argv[1]/100+($b?:.1)|0;
Input from command line, output to STDOUT
:
$ php lucky.php 99 3333
8
$ php lucky.php 0 2522
3
$ php lucky.php 0 abaa
3
Or using the same method as the ASM answer above:
PHP, 103 bytes
for([,$c,$s]=$argv;$i<4;$l+=$r)if(2<$r=substr_count($s,$s[$i],++$i)){$l++;$c+=77;}echo$l+=$c+10*!$l>99;