Fixed Deprication warning

DEPRECATION WARNING: Relation#calculate with finder options is
deprecated. Please build a scope and then call calculate on it instead.
DEPRECATION WARNING: The :distinct option for `Relation#count` is
deprecated. Please use `Relation#distinct` instead. (eg.
`relation.distinct.count`).