Hello @Andy Millne!
I don't know if I am wrong, but I have realized that when review is on for Pages database, there is no $record->rating_hits, only $record->record_reviews as long as the rating stars will be based on the reviews, so the rating hits are the same as the record reviews. Is that right?
So I have used record reviews for ratingCount and reviewCount.
{{\IPS\Output::i()->jsonLd['article'] = array('@context' => 'http://schema.org/', '@type' => 'Product', 'name' => $record->_title, 'image' => 'https://cdn.mydomain.com/ ' . $record->record_image, 'brand' => array('@type' => 'Thing', 'name' => $marca['nome']), 'aggregateRating' => array('@type' => 'AggregateRating', 'ratingValue' => $englishrating, 'ratingCount' => $record->record_reviews, 'reviewCount' => $record->record_reviews), 'offers' => array('@type' => 'AggregateOffer', 'lowPrice' => $lowPrice, 'highPrice' => $highPrice, 'offerCount' => $results_number, 'priceCurrency' => 'BRL', 'availability' => $availability));}}