Total Invoice count by order id Magento 2.

You can count the no. of Invoice generated for the specific order by order id in Magento 2.

Using Magento\Sales\Api\InvoiceRepositoryInterface interface you need to use getList() method with SearchCriteriaBuilder class to fetch no. of an invoice for the order.

Using Below code snippet you can get the count of invoice for an order,

$orderId = 1; // order id
$this->getCountInvoicesForOrder($orderId);

Using the above way, You can fetch no. of an invoice for the single order.