Function Physics2DDirectBodyState.getContactCount

Returns the number of contacts this body has with other bodies. Note: By default, this returns 0 unless bodies are configured to monitor contacts. See RigidBody2D.contactMonitor.

long getContactCount() nothrow @nogc const;