The efficient way is to use a loop. The standard library doesn't provide a method to do this.
Something like this:
Matcher m = Pattern.compile(regex).matcher(input);
int count = 0;
while (m.find()) {
count++;
}
The approach of using String.split(separator) is probably1 less efficient, because it entails creating an array containing the string segments. There is certainly no sound reason to think that the computational complexity of split is different to the approach with the loop.
1 - I haven't bothered to measure this. If this is something that matters to you, you should construct a benchmark ...