In calculated columns we can refer to other columns, but not other rows. A common solution would be to create a master list that had the names and current number. (so each name would only exist once on this list. You could then create a workflow that runs for each new item on the original list that tries to find the item in the master list and increments the number if found, or, adds a new item if not found. The workflow could then update the field in the original list with the current max value for that name.
It's a bit complex to get this working really well, to take things like deletes or name changes into account.
Another option is a code-based event handler, or a custom form with javascript to query the list, find the count of matching items, and update the field on the form.