Here's how I would do it:
First you need two measures both counting the exceptions for java.net.SocketTimeoutException but with different message "Read timed out" or "Connection timed out". That measure type is found under Server Side Performance -> Functional Health -> Exceptions -> Count.
Then you will need another measure to count the invocations of your method under Server Side Performance -> Transaction based Measures -> Methods -> Invocations.
You can then combine the exception measures with the invocation measure as BT filters in two BT using the AND logic and use that to calculate whatever results you're interested in.