Pls comment out the query that will be helpful.
... your search
| rex "(?<exception>Nullpointer|IllegalArgument|etc)"
| stats count by exception
You could extract the exception from the _raw event field and base your counts on that.
No just assume I gave you already known Exceptions like I mentioned above there. So for that how can we show the count of each and every Exception in table. Here we have only strings i.e Exception names which are not extracted to field in common. With that, I have to generate a table row as an exception name and col as count.
Pls make sure there is no common field extraction.
... your search
| rex "(?<exception>Nullpointer|IllegalArgument|etc)"
| stats count by exception