[Change] try catch for countmatch

Signed-off-by: Oleg Komarov <o.komarov11@imperial.ac.uk>
[Fix] typeunmatch

Signed-off-by: Oleg Komarov <o.komarov11@imperial.ac.uk>