Add include to count method.

Otherwise fields for the where block aren't loaded. I.E. if you filter a value on an eager loaded entity