This is incorrect
This information is faulty, guys. Lockhart never spoke of such a counter-curse. However, Professor Dumbledore tried to use a counter-curse to undo the petrification of Mrs. Norris, which was impossible to do with wand and spell since it was a Basilisk that petrified people and not a curse.
I believe the passage is;
Dumbledore had arrived on the scene, followed by a number of other teachers. In seconds, he had swept past Harry, Ron, and Hermione and detached Mrs. Norris from the torch bracket. “Come with me, Argus,” he said to Filch. “You, too, Mr. Potter, Mr. Weasley, Miss Granger.”
Lockhart stepped forward eagerly. “My office is nearest, Headmaster — just upstairs — please feel free —”
'“Thank you, Gilderoy,” said Dumbledore. The silent crowd parted to let them pass. Lockhart, looking excited and important, hurried after Dumbledore; so did Professors McGonagall and Snape.'As they entered Lockhart’s darkened office there was a flurry of movement across the walls; Harry saw several of the Lockharts in the pictures dodging out of sight, their hair in rollers. The real Lockhart lit the candles on his desk and stood back. Dumbledore lay Mrs. Norris on the polished surface and began to examine her. Harry, Ron, and Hermione exchanged tense looks and sank into chairs outside the pool of candlelight, watching.The tip of Dumbledore’s long, crooked nose was barely an inch from Mrs. Norris’s fur. He was looking at her closely through his half-moon spectacles, his long fingers gently prodding and poking.'Professor McGonagall was bent almost as close, her eyes narrowed. Snape loomed behind them, half in shadow, wearing a most peculiar expression: It was as though he was trying hard not to smile. And'Lockhart was hovering around all of them, making suggestions.
'“It was definitely a curse that killed her — probably the Transmogrifian Torture — I’ve seen it used many times, so unlucky I wasn’t there, I know the very counter-curse that would have saved her....”'
Lockhart’s comments were punctuated by Filch’s dry, racking sobs. He was slumped in a chair by the desk, unable to look at Mrs. Norris, his face in his hands. Much as he detested Filch, Harry couldn’t'help feeling a bit sorry for him, though not nearly as sorry as he felt for himself If Dumbledore believed Filch, he would be expelled for sure.'Dumbledore was now muttering strange words under his breath and tapping Mrs. Norris with his wand but nothing happened. She continued to look as though she had been recently stuffed.'“
"I remember something very similar happening in Ouagadogou,” said Lockhart, “a series of attacks, the full story’s in my autobiography, I was able to provide the townsfolk with various amulets, which cleared the matter up at once....”'
The photographs of Lockhart on the walls were all nodding in agreement as he talked. One of them had forgotten to remove his hair net.'At last Dumbledore straightened up.'“She’s not dead, Argus,” he said softly.'Lockhart stopped abruptly in the middle of counting the number of murders he had prevented.'“Not dead?” choked Filch, looking through his fingers at Mrs. Norris. “But why’s she all — all stiff and frozen?”'
'“She has been Petrified,” said Dumbledore (“Ah! I thought so!” said Lockhart). “But how, I cannot say..."