replace #merge with relation API calls in calculations_test.
Merge pull request #10048 from senny/replace_merge_with_relation_calls_in_count_api

replace #merge with relation API calls in calculations_test.