Java integration with DMN

Hello,
I want to calculate the count of contracts and implement this count as one of the input in DMN Table. Can anyone site a short example ?

I am stuck with the javacscript expression for input.