Fix FieldDistribution to count relative to specified tree

Previously, counts were record-based however this effectively "broke" the distribution for fields that went through a many-to-many relationship.

The caveat to this fix is that fields that contain values that are not associated to the records in the root model will not be included in the distribution (with a count of 0).