Add an area2d to your bullet
create a label and give it a script
Connect the area entered signal to label
In the label script, create a variable
var bullets_num
func onareabodyentered(body):
if area isingroup("player"):
bullets_num += 1
under the process function
text = bullets_num