James Kirk defeated the M5 and Vaal computers. He even defeated the zenith of all computers, V-GER.
How many computers has he defeated?
I'm counting androids/robots in with this. Some minor spoilers if you've not watched TOS
I'm going to ballpark I, Mudd at 10, since trying to keep track of how many androids there are is nearly impossible due to their reuse of actors/actresses. That gives us about 29 distinct computers
Machavity's answer lists 13 episodes or movies when he thinks that Captain Kirk defeated a computer.
If someone isn't convinced that Kirk defeated a computer in one or more of them he can take them off the list. And if someone thinks that Kirk also defeated a computer in other productions he can add them to the list.
But at the moment we can accept thirteen as the "lucky" number of productions where Kirk defeated computers.
So that means that James Kirk defeated thirteen computers?
In "What Are Little Girls Made of?" a group of five androids on a planet had a plan to take over the Federation. Kirk's actives resulted in the destruction of all five and thus the defeat of their attempt. So Kirk could be credited with the defeat of one to five computers in this episode, depending on how directly or indirectly counts as defeated.
HOw many computers/robots/androids did Kirk defeat in "I, Mudd"? Machavity's answer describes them as multiple, and in another place says:
I'm going to ballpark I, Mudd at 10, since trying to keep track of how many androids there are is nearly impossible due to their reuse of actors/actresses.
In "I, Mudd" there is a scene with Spock and Norman at Norman's console:
SPOCK: Very interesting. Very interesting. This is a most unusual device.
NORMAN: It is our central control complex.
SPOCK: Did I understand there are more than two hundred thousand of you?
NORMAN: Two hundred and seven thousand, eight hundred and nine.
So that indicates that the total number of androids on the planet Mudd when Kirk defeated them should have been about:
Two hundred and seven thousand, eight hundred and nine.
And it would have been exactly 207,809 unless Norman lied to Spock or unless there was a change in the number of androids between that moment and the defeat of the androids, such as the production of any more of Mudd's favorite models of androids.
So we could say that Kirk defeated 207,809 computers in "I, Mudd", plus one to five computers in "What Are Little Girls Made of?", plus eleven other computers in other episodes and movies if we accept Machavity's list. So Kirk should have defeated a grand total of 207,821 to 207,825 computers.
But what about networks of computers? I found examples of early use of computer networks in the late 1950s and early to mid 1960s at:
So possibly the creators of TOS imagined that some of the computers shown on TOS with more than one visible section could have been two or more computers networked together.
Thus it is possible that in one or more episodes Kirk defeated two or more computers networked together instead of one single computer.
I may also note that in the scene from "I, Mudd" mentioned above, it continues with:
SPOCK: This would seem to be a simple relay centre. Are all of you controlled through this device?
NORMAN: (his number 1 collar flashes) I am not programmed to respond in this area.
SPOCK: Oh, that's quite understandable.
When Spock reports to Kirk he says:
SPOCK: Captain, I've just had a most fascinating meeting with Norman, and I'm convinced I've discovered a very important inconsistency.
Spock is then interrupted, but later:
KIRK: All right, what have we got to work with?
SCOTT: Well, Captain, androids and robots, they're just not capable of independent, creative thought.
SPOCK: Yet the device that Norman claims to be their central control is totally inadequate to the task of directing more than two hundred thousand of them.
KIRK: I agree. What in your opinion does direct them?
SPOCK: There are a large number of Alices and Trudies, Maisies, Annabels, and according to my research, a Herman series, an Oscar series, a whole plethora of series in fact. But only one Norman.
KIRK: Norman. When I told one of the Alices that the Enterprise was a lovely lady and we loved her, she said, Norman, co-ordinate. Why Norman? Unless
SPOCK: To function as they do, each android mind must be one component of a mass brain linked through a central locus.
KIRK: Named Norman. Forming one gigantic, highly intelligent mind. And the glowing badges, they indicate the mind in operation.
SPOCK: That would seem logical.
So that would indicate that the creators of TOS imagined something like a computer network. So some of the other computers defeated by Kirk could have been networks of computers.
And on the other hand in "i, Mudd" Kirk believes the androids of Planet Mudd comprise one gigantic, highly intelligent mind, even though there are over two hudnred thousand android bodies.
So do the androids on Planet Mudd count as one computer or 207,809 computers?
So depending on a person's point of view, it could be said that Kirk defeated either 13 computers or over two hundred thousand computers.
Machavity's answer is very good and earned my upvote, but I don't think it completely accurate. Let's count androids (self-aware) and robots (non-self-aware) as computers. (Again a nod to Machavity.) It's tricky to define computers here since they can be networked together or since one computer can remotely control another.
Let's not count any machines that were not in conflict against Kirk. The question asked about defeating them, not about accidentally destroying them.
The Return of the Archons Defeated the computer, Landru, that controlled the society by talking to it and convincing it that was evil Computer destroyed itself a display of pyrotechnics. (Count = 1)
A Taste of Armageddon Kirk discovers a civilization in a virtual war with another civilization waged by computers. The catch is that casualties are real. The computers are in constant contact with each other, and severing that connection causes both computers to self-destruct. (Count = 2. Maybe more.)
The Doomsday Machine Kirk pilots a crippled starship down the maw of a planet killer. (Count = 1)
The Ultimate Computer Kirk convinces the M-5 multitronic unit to feel regret for all lives lost aboard the Excalibur. The M-5 promptly shuts down. (Count = 1)
Spock's Brain Kirk once again finds a computer run by Spock's brain to control every aspect of a society. Kirk orders McCoy to remove the brain from the computer, thus causing the civilization to die. (Count = 1)
For the world is hollow and I have touched the sky Kirk discovers a wayward asteroid with a society inside it controlled by the computer named, Oracle. (Count = 1)
The Changeling The Enterprise encounters an old space probe that is capable of destroying starships. He defeats it by causing it to realize its errors and promptly self-destruct. (Count = 1)
That which survives Kirk finds a ghost planet where all the inhabitants died long ago. The automated computer on the planet continues to defend it. (Count = 1)
What are little girls made of? There were 5 androids in that episode: Ruk, Korby, Brown, Andrea, and the fake-Kirk. Ruk fought the real Kirk with intent to kill, but Kirk persuaded Ruk to turn against Korby. Kirk also defeated Brown. The other androids killed each other. You could say Kirk defeated all 5 through trickery, but some of those are indirect kills. (Direct count = 2, indirect count = 5)
I, Mudd Kirk finds Harry Mudd on a planet (renamed as Mudd) with thousands of robots controlled by a central computer. Spock and Kirk use logic to defeat all of the robots. (Count = 207,809 robots + 1 central computer. You could also count this as just 1. It could be put either way.)
Star Trek: The Motion Picture The Ilia-probe was part of V'Ger, but although V'Ger was not destroyed or defeated, the probe was, so Kirk gets 1 for that. V'Ger was transformed at the end of the movie. (Count = 1)
5 of these were destroyed simply by Kirk talking at it.
Requiem for Methuselah - Kirk caused Rayna Kapec to shut down due to her conflicted emotions for him, but he was not in actual conflict against her, so I don't count this one.
Star Trek 2: The Wrath of Khan Kirk reprogrammed the Kobayashi Maru simulation. Kirk did not defeat the computer in the sense that he was in conflict with it so much as reprogrammed it for his convenience.