You will have to write custom java code for your use case. You can park it either within routine or some other java component.
My recommendation will be to create a routine and call it through tmap where you will be given the input string as input parameter and you will get the vowel count as output parameter of routine.
Below link will help you to get simple code snippet in Java.