Your use of "which" is great! But I've got a couple of other suggestions for you:
1) There's more than 1 patent application, so you need "are eventually granted" rather than "is"
2) "Non-granted" is awkward - I would say "not granted"
3) A comma between the two phrases in your sentence might improve readability, as it's a natural point to pause in the middle
So your sentence might end up looking like
I would like to count the number of patent applications which are eventually granted, and the number of applications which are not granted.
I've put a few of those words in italics because you could cut them out of the sentence to make it more concise if you like.