This is actually a very easy one.
You really have to give it a try on your own first.
Start checking if from the input you receive an opening diamond (<), then listen for closing diamonds (>).
Keep a tab on how many opening - closing pairs there are and that's the answer.
As you can see, the logic is easy. Go ahead, try to do an implementation. It shouldn't take more than 20-30 lines of code.
When you have some code and you really cannot continue forward, share what you have that far. (I mean the minimum is that you have a main, have the input, iterate through the individual characters and check if they are opening/closing diamonds.)
Note: If you have never ever written a C program in your life, you should check out some tutorials first (e.g.
https://www.tutorialspoint.com/cprogramming/index.htm).
Good luck!