This statement is absolutely false. In fact, it is more or less the direct opposite of what Kant really says in his categorical imperative. This statement is more of a statement of Mill's or Bentham's utilitarianism, not of Kant's moral philosophy.
The categorical imperative has nothing to do with consequences, just with motivations and intentions. It says that we should always act in such a way that our actions could become the basis of a universal moral law. All that this says is that we should act in ways that have motives that would be good moral laws. It does not say anything about measuring the consequences of the actions.