Trump was doing this to make the case that he didn’t actually lose the popular vote, which has become a Democratic rallying cry following Clinton’s loss. It’s clearly a sore spot for Trump.
But the president-elect is also, unwittingly and amazingly, calling into question the results of an election that he won nearly three weeks ago. The logical extension of his argument is that all results should not be trusted. In effect, Trump is lending credence to the very same recount effort that he criticized as superfluous.