Zend certified PHP/Magento developer

output information from the database magento 2

/Block/Reviews.php

< ?php
namespace TrainingReviewsBlock;
use TrainingReviewsModelResourceModelReviewsCollection;

use MagentoFrameworkViewElementTemplate;

class Reviews extends MagentoFrameworkViewElementTemplate
{

public function _prepareLayout()
{
    $this->pageConfig->getTitle()->set(__('Users Reviews'));

    return parent::_prepareLayout();
}

protected $_productCollectionFactory;
protected $_productVisibility;

public function __construct(
    MagentoFrameworkViewElementTemplateContext $context,
    TrainingReviewsModelResourceModelReviewsCollectionFactory 
$productCollectionFactory,
    array $data = []
) {
    $this->_productCollectionFactory = $productCollectionFactory;

    parent::__construct($context, $data);
}

public function getProductCollection()
{
    $collection = $this->_productCollectionFactory->create();
    $collection->addFieldToFilter('result', ['like' => '%likes%']);
    $collection->count();
    return $collection;
 }
}

/view/frontend/templates/reviews.php

< ?php
$productCollection = $this->getProductCollection();
foreach ($productCollection as $product) {
print_r($product->getData());
echo "
"; } ?>

This function outputs rows and information about them, I only need the number of rows.

I would appreciate your help!