Zend certified PHP/Magento developer

Output from the value database magento 2

I want to get a numeric value from the database that calculates how many times in the column there are words “Test” in the database I know how to do it (SELECT COUNT (*) FROM training_reviews WHERE result LIKE ‘test’;) but how I will appreciate this in magento2 for your help.
My attempt:

/app/code/Test/Module/view/frontend/templates/test.phtml

< ?php
$connection = $this->getConnection();
$select = $connection->select();
$select = $model->getCollection()
->select()
->count()
->from($this->getDbPrefix() . 'name_table', '*')
->where('result', ' likes%');
return (int)$objectManager->fetchOne($select);
?>