You can count the no. of Shipment generated for the specific order by order id in Magento 2.
Using Magento\Sales\Api\ShipmentRepositoryInterface interface you need to use getList() method with SearchCriteriaBuilder Object to add filter by order id.
Using Below code snippet, You can fetch the count of shipment for an order,
