Praise be to Allah.
Such a question cannot be answered without knowing the exact words uttered by the husband or knowing what he intended and meant by those words – did he intend by denying it to set himself free from his wife, because he was upset at their spreading the news of the marriage? Or did he simply wants to conceal the marriage without any intention of setting himself free from his wife?
If he simply wanted to conceal his marriage, without any intention of divorce, then that does not count as a divorce
The fuqaha’ (may Allah have mercy on them) discussed a similar issue. They said: if a man is asked, “Do you have a wife?” and he replies “No,” but he is lying, that does not count as a divorce.
Ibn Qudaamah (may Allah have mercy on him) said: If it is said to him, “Do you have a wife?” and he says, “No,” intending to lie, that does not imply anything... because saying “I did not have a wife” could be a metaphor (for divorce) if he had the intention of divorce. If he intended to tell a lie, then he did not intend to divorce her and it does not count as such.
End quote from al-Mughni, 7/400
Al-Bahooti (may Allah have mercy on him) said: If it is said to him, “Do you have a wife?” and he says, “No,” intending to lie, he has not divorced her, because it may be a metaphor (for divorce), and if he intended to tell a lie and did not intend to divorce (then it does not count as divorce).
End quote from Kashshaaf al-Qinaa‘, 5/247
Therefore if this man said, “So and so is not my wife,” if what he intended by that was divorce, then it counts as such, but if he intended to conceal the marriage, then it does not count as a divorce.
If he denied the marriage, such as if he said, “I did not marry So and so” or “I did not do the marriage contract with So and so,” this wording is to be regarded as a lie, and it does not count as a divorce.
And Allah knows best.