Retrieve total Website count from the System Magento 2.

You can use getCount() method to retrieve total number of website available in the system using Magento 2.

You can manually count all the website list from the Admin panel via Stores -> Setting -> All stores.

Interface Provides the functionality:
Magento\Store\Api\WebsiteManagementInterface

By Programmatically You can use the below code snippet to total website,

Call from the template or any PHP class,
echo $websiteCount = $this->getWebsiteCount();

Output: 2

Return the result of available website in a system.