This is probably correct, but not the whole truth.
The UN doesn't maintain a general list of terrorist groups - this would be tricky in parts of the world in which terrorist groups can become governments - Think ANC or the Sandinistas (or the Contras). There are lots of "revolutionary governments", and they may have once been considered a terrorist group. (And I might mention the RSS in India too)
However there is a resolution, 1267, that authorises the use of sanctions against Al Qaeda and related organisations (later widened to include ISIL/daesh). To this end, the UN keeps a list of these organisations, and it is to this that it seems the minister was referring.
Now as this list is a list of Al Qaeda type organistions, it is disproportionally biased towards Pakistan, Afghanistan and Syria.
There is a valid point here, Pakistan does have a lot of Islamic terrorist groups It is probably true to say that there are 27 Al Qaeda inspired groups based in Pakistan. But the minister is not speaking the whole truth here, as the UN list does not include many groups that are not aligned with Al Qaeda. For example, Indian groups such as the ULFA (Assam independence) or Bajrang Dal (Hindu ultranationalist) are not on the list, so a literal count is misleading.