I solved it by doing using this code:
global $current_site;
$current_site_id = $current_site->id;
$args = array(
'network_id' => $current_site_id,
);
$site_info = wp_get_sites( $args );
$num_of_sites = sizeof($site_info);
If anyone has a more elegant way of solving please post your answer.