You should only use triggers if you want to count the Secondary Property Assignment entries. When the master-detail relationship is accessible, we can utilise Rollup summary to count the number of Secondary Property Assignment data.
However, you have self-relationship here. As a result, you can create a trigger that counts the number of records.
Hope this helps!
Enroll in our Salesforce Course here to learn more about creating a trigger in Salesforce.
Thanks!