ArcGIS Pro 2.7 API Reference Guide
PartCount Property (Multipart)
Example 

ArcGIS.Core.Geometry Namespace > Multipart Class : PartCount Property
Gets the number of parts in this instance.
Syntax
public int PartCount {get;}
Public ReadOnly Property PartCount As Integer
Example
int numParts = polyline.PartCount;
// get the parts as a readonly collection
ReadOnlyPartCollection parts = polyline.Parts;
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

Multipart Class
Multipart Members