Like this, with one awk:
awk '$NF=="*"{$NF=""; arr[$0]++}END{for (i in arr) print i arr[i]}' ./*
* `$NF` is the latest string separated by space(s) by default
* the main trick is to create an associative named `arr`ay with the current words as _key_ and incrementing as _value_
* at the `END` we iterate over the `arr`ay to `print` each keys/values
With perl one-liner:
perl -anE '
if ($F[-1] eq "*") {
$k = join " ", @F[0..@F-2];
$a->{$k}++
}
END{say "$_ $a->{$_}" for keys %$a}
' ./*
The `-a` is the _split_ mode in `@F` default array