Improve cast test
Add count for RelationalPathBase
Add count distinct for RelationalPathBase
Add test